- Home /
How do I hide a Canvas that is already in the scene?
So hi before you comment something please be aware that I am new in Unity. So I'm Using Unity 5.x
I would like to ask how do I hide a Canvas? It has a RawImage inside
I tried this
GameObject.Find( "Canvas" ).GetComponent<GUIContent>().enabled = hide;
but it doesn't work. Hope anyone can answer this question thanks!
Comment
Best Answer
Answer by Ekta-Mehta-D · Aug 18, 2015 at 07:04 AM
GameObject.Find( "Canvas" ).SetActive(false);
or
GameObject.Find( "Canvas" ).enabled = false;
This may work for you.
Answer by Vice_Versa · Aug 18, 2015 at 07:04 AM
to make something invisible do it like this
gameObject.GetComponent<Renderer>().enabled = false;
Your answer
Follow this Question
Related Questions
I can not reach Panel Object in Canvas 0 Answers
How to create or implement Accordion UI element with Scroller attached ? 0 Answers
Selector de personaje, Character selector 0 Answers
What does 'Reference Pixels per Unit' change visually? 3 Answers
scaling Horizontal/Vertical Layout group items to right size for all resolution 0 Answers