Page 1 of 1

Override Selector UI per object

Posted: Mon Aug 21, 2023 6:53 pm
by muffinsAKA
Hello! Really loving this plugin so far. I'm fairly new to Unity but have figured most of it out at this point.

The one thing I'm struggling with is figuring out how to change the selector ui based on the object.

I've tried a lot of things I've googled and read here but nothing seems to work.

I've attached my default setup that works which is a player controller with a Selector + Selector Use Standard UI Elements and a sewer grate object that has a Dialogue System Trigger and a Usable component.

As you can see in the screenshot I modified the default selector UI and that works, but then I duplicated the prefab and edited a few things and have tried many things to get it to be used but I am not sure what the right way is.

I've tried:
  • Adding a "Tag specific elements" under the Player Controller's "Selector Use Standard UI Elements" and putting the duplicated prefab into it. I put it under the tag "interactable" and added that tag to the sewer grate object.
  • Doing the same as above, but making the duplicated selection ui prefab a child of the sewer grate object, as I saw this on a forum post
  • Tried the same idea but using layers instead of tags, but no avail.
I feel like I'm missing something fundamental here.

The one thing I can note is that even though it's failing to show up on screen when I use these methods, if I look in the hierarchy I can see the elements enabling and disabling when I'm in the interaction space vs leaving it so it seems to understand what I'm trying to get it to do.

Re: Override Selector UI per object

Posted: Mon Aug 21, 2023 8:15 pm
by Tony Li
Add an instance to the scene. The Selector Use Standard UI Elements component doesn't automatically instantiate prefabs.

Here's an example scene:

DS_TagSpecificSelectorUI_2023-08-21.unitypackage

It's DemoScene1 except the computer terminal in the center of the room is now tagged "Respawn", and the Selector Use Standard UI Elements points to a different selector UI for the Respawn tag.