Tutorial: Adding Selector

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Peter Drake
Posts: 37
Joined: Tue May 17, 2022 3:49 pm

Tutorial: Adding Selector

Post by Peter Drake »

In the Quick Start tutorial, I am asked to add a Selector. When I do this, Unity asks if I want to add a "Selector Use Standard UI Elements" (see screenshot attached).

I checked yes, and it seems to work. Two components are attached to Player: "Selector" and "Selector Use Standard UI Elements (Script)". At the end of the tutorial, though, the Dialogue System Events script doesn't appear to disable either of these objects when the conversation starts.

Suggestions?
Attachments
Screen Shot 2022-05-17 at 12.52.19 PM.png
Screen Shot 2022-05-17 at 12.52.19 PM.png (52.32 KiB) Viewed 522 times
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Tutorial: Adding Selector

Post by Tony Li »

Hi,

You must configure the Dialogue System Events component yourself. Click the "+" in the lower right the OnConversationStart() block. This will create an event handler slot. Drag the Selector component's heading into the slot, and from the dropdown select Selector > enabled. For OnConversationStart(), leave the checkbox unticked; this indicates that the component should be disabled.

dialogueSystemEventsSelector.png
dialogueSystemEventsSelector.png (25.58 KiB) Viewed 520 times

Then do the same for OnConversationEnd() except tick the checkbox.

You don't need to configure Dialogue System Events to disable the "Selector Use Standard UI Elements" component.
Peter Drake
Posts: 37
Joined: Tue May 17, 2022 3:49 pm

Re: Tutorial: Adding Selector

Post by Peter Drake »

I had done that, as per the tutorial instructions.

It turns out that it is working, but the status in the Inspector isn't updating in Game mode. Specifically, when I start the conversation, the enabled box next to Selector stays checked ... until I move my mouse cursor out of the Game panel into the Inspector panel. Similarly for reenabling it when the conversation ends.

Is this just a general property of the Inspector?
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Tutorial: Adding Selector

Post by Tony Li »

Hi,

Yes, that's just Unity.
Peter Drake
Posts: 37
Joined: Tue May 17, 2022 3:49 pm

Re: Tutorial: Adding Selector

Post by Peter Drake »

Got it. Thanks!
Post Reply