Hiding UI instead of deactivating it

I find it more useful to click the little eyeball icon to the left of the UI in the hierarchy. You have to mouse over the space to the left of your UI and the eyeball will show, click it and now a line will go through it. This will hide the UI until unclicked, yet the UI will not show any errors and you can run the game and the UI will still show.

Could not seem to get hiding to work with this setup. Instead what I did earlier when I found the text was getting in my way I created an Empty Game Object stored the canvas inside that and changed the code to take a GameObject Instead of Canvas. Slight modification to make it use Set Active instead of .Enabled and it works fine for me.

Privacy & Terms