Page 1 of 1

Control the DemoMenue's Cursor Display Option

Posted: Wed Jul 10, 2024 9:46 am
by Aldurroth
Hello. I would like to toggle on and off the Demo Menues "Lock Cursor During Play" option using one of my own scripts. I need my cursor visible when I am trying to turn pages in my digital books. I use the cursor to turn pages.

Re: Control the DemoMenue's Cursor Display Option

Posted: Wed Jul 10, 2024 10:10 am
by Tony Li
Hi,

The DemoMenu script is mainly designed just to run the demo scene. Feel free to make a copy and customize it however you like. If you want to use a more robust menu system, you could use the Menu Framework addon available on the Dialogue System Extras page.

If you want to continue with the DemoMenu script, you can just untick the Lock Cursor During Play checkbox in the inspector or -- if you only want to keep it visible while reading a digital book -- you can disable the DemoMenu script while reading the book or turn off its cursor locking:

Code: Select all

FindObjectOfType<DemoMenu>().lockCursorDuringPlay = false;
PixelCrushers.CursorControl.SetCursorActive(true);

Re: Control the DemoMenue's Cursor Display Option

Posted: Wed Jul 10, 2024 12:00 pm
by Aldurroth
Ill give that a go. Thank you!

Re: Control the DemoMenue's Cursor Display Option

Posted: Wed Jul 10, 2024 12:20 pm
by Tony Li
Glad to help!

Re: Control the DemoMenue's Cursor Display Option

Posted: Wed Jul 10, 2024 3:36 pm
by Aldurroth
Would the demo mode script work if I exported the game into an executable?

Re: Control the DemoMenue's Cursor Display Option

Posted: Wed Jul 10, 2024 3:39 pm
by Tony Li
Yes.