- Home /
Question by
Tdew88 · Jun 30, 2015 at 12:15 PM ·
togglevisibility
How do I link a GUI toggle to a gameObjects visibility in C#?
Been Searching for this for a while, but all the code i find seems outdated, and is never for Unity5.
Basically, I'd like to have a set of toggles on the GUI that when clicked cause the object to not be rendered. I've gotten as far as being able to have that functionality through KeyCodes, but the end product will have enough objects in the scene that all need to be toggled on/off that this will get unwieldy fast, and I have no clue about the syntax with Unity 5's GUI is.
Any help would be greatly appreciated, and thanks in advance.
Comment
Your answer
Follow this Question
Related Questions
Toggle Visibility 1 Answer
Disappearing GUI 2 Answers
Visbility keyframes in animation 1 Answer
How do I Toggle between alternatives? 3 Answers
How to toggle GameObject visibility? 1 Answer