So basically i want a button where when i press it is gonna toggle the visibility of three 3d objects. And i want all of this to be done on a widget. And also one more thing i want a back button where when i press it toggles the visibility again.
The array is an exposed variable on the widget:
But you’ll be better off describing what you really want to achieve as I’m almost certain you’ll be dissatisfied with this.
There are dozen ways, surely. But if you do not know whether the original suggestion fits, how the heck are other people supposed to find out… You can’t possibly expect someone to iterate over all possibilities until something sticks.
The screenshot you attached seems to be unrelated to what you are requesting.
Think about how the widget is supposed to know which 3 objects to show / hide. What is their relation with the widget? Are they placed in the level or spawned dynamically? Is this supposed to be modular or one-off action? Are there more than 3 of those objects in the scene?