Page 1 of 1

Disable usable selection UI

Posted: Mon Apr 24, 2023 7:05 am
by thecodehermit
Hi

I have a usable component attached to one NPC. I also have a Selector component attached to my hero.
When I hover over the NPC I get 2 UI messages on the top middle of the screen. One is coming from the hero selector and the other is from the NPC usable.
I managed to get rid of the one coming from the Selector by disabling "Use default GUI" in the Selector component/script.
But how do I hide the message for the Usable component from the NPC ?

I only want to hide the messages. I am going to use the events from those components to create my own notifications.

Re: Disable usable selection UI

Posted: Mon Apr 24, 2023 8:10 am
by Tony Li
Hi,

If your NPC has a Standard Usable UI as a child GameObject, remove it.

Re: Disable usable selection UI

Posted: Mon Apr 24, 2023 8:35 am
by thecodehermit
It doesn't have that. It only has a Usable component.

Re: Disable usable selection UI

Posted: Mon Apr 24, 2023 8:46 am
by Tony Li
Hi,

Then I don't know where that second UI is coming from. Please try making a small test scene. When you get your test scene working the way you want (i.e., only showing your custom UI), you can apply the same setup to your original scene.

Re: Disable usable selection UI

Posted: Mon Apr 24, 2023 10:26 am
by thecodehermit
ohh... I feel like an idiot sometimes...
I had two heroes, and they both have the selector component... I disabled the "Use default GUI" in the second hero and the messages are gone. That explains why I had 2 messages as well. They were coming from each hero and not the NPC.
Anyway everything is fixed now

Re: Disable usable selection UI

Posted: Mon Apr 24, 2023 10:28 am
by Tony Li
Great! Thanks for the update.