Hide a button object

Could someone please help me to hide a button object?

I have tried “backButton.GetComponent ().image.enabled = false;” and other things but not succeeded. Probably very simple :frowning:

Finally found the answer. This is done by adding a Canvas Group and manipulate the Alpha property.

You can also just set the game object to inactive.

I think i tried that but it did not disappear.

Enabled isn’t the same as active. Enabled is just for components. Active is for the entire game object. I would be really surprised if it didn’t disappear since I use it all the time. There is a Game Object.SetActive method you can call or it’s the checkbox next to the object name in the inspector.