Image/Icon above object for Proximity Selector
-
- Posts: 55
- Joined: Fri Apr 16, 2021 4:32 pm
Image/Icon above object for Proximity Selector
I wanted to see if I could have an icon or image above an NPCs head when close enough to talk to them. I know I can have a Use Message with Proximity Selector, but is there a way to use that to have an image or icon above the GO/NPCs head? I appreciate any help or insight I can get on this.
Re: Image/Icon above object for Proximity Selector
Hi,
Yes. Add an instance of the 'Basic Standard Usable UI' prefab to the NPC. Then customize its appearance.
Yes. Add an instance of the 'Basic Standard Usable UI' prefab to the NPC. Then customize its appearance.
-
- Posts: 55
- Joined: Fri Apr 16, 2021 4:32 pm
Re: Image/Icon above object for Proximity Selector
Thanks for the reply! Do I just need to add the Basic Standard UI prefab as a child? Is there any documentation on the prefab or usage like this?
Re: Image/Icon above object for Proximity Selector
Hi,
Set up everything else as before, where it shows the use message at the top of the screen.
Then add an instance of the 'Basic Standard Usable UI' as a child of the NPC. You don't need to do anything else. The Proximity Selector will check if the NPC's hierarchy has a (Basic) Standard Usable UI. If so, it will show it instead of showing the use message at the top of the screen.
Set up everything else as before, where it shows the use message at the top of the screen.
Then add an instance of the 'Basic Standard Usable UI' as a child of the NPC. You don't need to do anything else. The Proximity Selector will check if the NPC's hierarchy has a (Basic) Standard Usable UI. If so, it will show it instead of showing the use message at the top of the screen.
-
- Posts: 55
- Joined: Fri Apr 16, 2021 4:32 pm
Re: Image/Icon above object for Proximity Selector
OK, so I tried that and it is still only showing the message at the top of the screen, BUT if I enable the Canvas on the Basic Standard Usable UI prefab, then it appears. Should this be enabling automatically or should I be adding something in my code for it? I do have that message that the scene is missing an event system. Maybe that is the issue?
Re: Image/Icon above object for Proximity Selector
Hi,
Add a 'Selector Use Standard UI Elements' component to the GameObject with the Proximity Selector if it doesn't already have one.
The EventSystem warning isn't the issue. That's just letting you know that the Dialogue System is adding an EventSystem because the scene doesn't have one. The dialogue UI uses Unity UI, which requires an EventSystem for interaction.
Add a 'Selector Use Standard UI Elements' component to the GameObject with the Proximity Selector if it doesn't already have one.
The EventSystem warning isn't the issue. That's just letting you know that the Dialogue System is adding an EventSystem because the scene doesn't have one. The dialogue UI uses Unity UI, which requires an EventSystem for interaction.
-
- Posts: 55
- Joined: Fri Apr 16, 2021 4:32 pm
Re: Image/Icon above object for Proximity Selector
That did the trick. Thanks SO MUCH! this asset is really awesome. I am still working through some other stuff, so I might have other questions. Again, thanks for sticking with me through this!
Re: Image/Icon above object for Proximity Selector
Glad to help!