With some help from others on this forum I have put together some behavior in my UI whereby imported STL meshes change color when you click on them.
What I’d now like to add is additional behavior so when you click on those same mesh elements it shows a GUI element associated with it and hides other GUI elements associated with other meshes.
The attached playground shows the imported STL meshes with color changing behavior and also 4 GUI elements associated/linked with four of these meshes. Id like these elements to only be visible when the associated mesh is highlighted.
I’ve had a look through the forum and documentation but can’t really find anything similar so any help would be appreciated.
Hi! You have to somehow link the GUI elements and models. I did one possible solution for your scene and added comments to clarify the code. Now the links are set randomly between to GUI elements and models so you have to fix those.
If you want to show multiple GUI elements then you have to change the logic a little bit. Here is fixed playground that support show/hide multiple GUI elements when clicking a model.