How do I hide the UI in the Game view (in editor)?
For some reason I cannot find a solution for this seemingly common issue. My game's dialogues and UI always shows in the Game view tab. I tried disabling the UI (unchecking) gameObject and then re-enabling once the game starts via SetActive(true)
, but apparently disabling objects in Inspector locks them completely. I just want to hide all UI elements while I'm working in the editor. Constantly checking/unchecking the UI gameobject while in the Inspector doesn't seem efficient.
Answer by Hatsuko · Nov 14, 2017 at 04:41 AM
Hello. I don't understand this
but apparently disabling objects in Inspector locks them completely
You can use SetActive(true)
to turn on a GameObject when game starts, but this script can't be attach to the same object that's turned off. When a script is attached to a non-active GameObject, several event functions won't execute, ex: Start, Update
If you listen closely, you can hear me facepal$$anonymous$$g. Thank you! I knew it was a silly solution.