How do I get rid of "Spacebar to interact" message?
-
- Posts: 194
- Joined: Mon Jul 01, 2019 1:21 pm
How do I get rid of "Spacebar to interact" message?
Hey, I made an NPC following the quick start guide and it constantly has a message on screen saying NPC (spacebar to interact). I can't figure out where this is in the UI. How do I delete it?
Re: How do I get rid of "Spacebar to interact" message?
That's the selector UI. If you're not using a Selector or Proximity Selector component, you can inspect the Dialogue Manager's Instantiate Prefabs component and remove Standard UI Selector Elements from the Prefab list. It should hide automatically, though, so there's probably something else to this. If you're not using Selector or Proximity Selector, remove the Usable components from GameObjects in your scene.
-
- Posts: 194
- Joined: Mon Jul 01, 2019 1:21 pm
Re: How do I get rid of "Spacebar to interact" message?
If I remove it from Instatiate Prefabs, it still shows up and seems to function the same. Weird. Removing the Usable component just makes it that you can't interact with the NPC.
I'm pretty sure I've screwed something up along the way here...
What I'd actually like is to be able to click anywhere on screen to initiate the conversation, and for there to be no prompts or text of any kind.
I'm pretty sure I've screwed something up along the way here...
What I'd actually like is to be able to click anywhere on screen to initiate the conversation, and for there to be no prompts or text of any kind.
Re: How do I get rid of "Spacebar to interact" message?
Got it. Here's one way: Remove the Selector component and all Usable components in the scene. Add a Canvas with a UI button that covers the whole screen. (If you want to make it invisible, set the Image's Color > alpha to zero.) Configure the UI button to call the Dialogue System Trigger's OnUse() method.
Add a Dialogue System Events component to the Dialogue Manager GameObject. Configure the OnConversationStart() event to disable the Canvas. Configure OnConversationEnd() to re-enable it.
Add a Dialogue System Events component to the Dialogue Manager GameObject. Configure the OnConversationStart() event to disable the Canvas. Configure OnConversationEnd() to re-enable it.
-
- Posts: 194
- Joined: Mon Jul 01, 2019 1:21 pm
Re: How do I get rid of "Spacebar to interact" message?
Is there a way to have the selector use a mouse click instead of a key? I've actually got it pretty close to what I'm aiming for, I just can't figure out how to change that.
Re: How do I get rid of "Spacebar to interact" message?
Sure! Set the Selector's Key to Mouse 0, or assign an input button (such as "Fire1") that's assigned to the mouse button.
-
- Posts: 194
- Joined: Mon Jul 01, 2019 1:21 pm
Re: How do I get rid of "Spacebar to interact" message?
Cool, got it working! Thanks