Merry Christmas!
I'm using a Unity UI in Prefab for my Hotspots menu, and my TMPro text object is a childobject of my Image Gameobject - which acts as a background for this text. The text is linked to AC's menu and updates correctly according to the specified Hotspot label.
Only, I have a few hotspots which have no label (intended) As recommended elsewhere here, I've forced these to be empty by pressing Space once.
This successfully hides the text from the Hotspot text element, but the background image continues to show.
Is there any existing way around this? Or maybe a new "Graphic type" option in the Graphic Element type option in the AC menu which allows you to link it to a text field and turn it off if the associated text string is empty/space?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
You could attach a script to it that sets its "enabled" state based on the contents of the Text box, i.e.:
Thanks! Works after changing it to IsNullOrWhiteSpace