Hide Cursor While Playing

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ViralJoe
Posts: 2
Joined: Thu Oct 14, 2021 2:21 am

Hide Cursor While Playing

Post by ViralJoe »

I'm rather new to Dialogue System and now that I have enabled it my cursor shows during gameplay and is no longer locked to the screen. I currently have "Cursor.lockState = CursorLockMode.Locked" in my look around script and that worked before importing and setting up DS. Ideally I would like the cursor locked and hidden during gameplay, visible during the dialogue to select responses, and then hidden again afterwards. Any help on the subject would be greatly appreciated.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Hide Cursor While Playing

Post by Tony Li »

Hi,

Inspect the Dialogue Manager GameObject's Input Device Manager component. UNtick Control Cursor State.

To make the cursor visible during conversations, inspect the Dialogue System Trigger that starts the conversation. In Actions > Start Conversation, tick Show Cursor During Conversation.

Alternatively, if you don't use a Dialogue System Trigger to start conversations, you can add a Dialogue System Events component to the player GameObject. Configure the OnConversationStart() event to show the cursor and OnConversationEnd() to hide it.
ViralJoe
Posts: 2
Joined: Thu Oct 14, 2021 2:21 am

Re: Hide Cursor While Playing

Post by ViralJoe »

Excellent, thank you very much it worked!
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Hide Cursor While Playing

Post by Tony Li »

Happy to help!
Post Reply