Control the DemoMenue's Cursor Display Option

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Aldurroth
Posts: 43
Joined: Wed Jul 20, 2022 8:44 pm

Control the DemoMenue's Cursor Display Option

Post 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.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Control the DemoMenue's Cursor Display Option

Post 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);
Aldurroth
Posts: 43
Joined: Wed Jul 20, 2022 8:44 pm

Re: Control the DemoMenue's Cursor Display Option

Post by Aldurroth »

Ill give that a go. Thank you!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Control the DemoMenue's Cursor Display Option

Post by Tony Li »

Glad to help!
Aldurroth
Posts: 43
Joined: Wed Jul 20, 2022 8:44 pm

Re: Control the DemoMenue's Cursor Display Option

Post by Aldurroth »

Would the demo mode script work if I exported the game into an executable?
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Control the DemoMenue's Cursor Display Option

Post by Tony Li »

Yes.
Post Reply