Show and hide a canvas on a button click.

I have two canvases in my scene one is for the main menu. It has play, options and quit buttons. I would like it that when I click the options button it shows a second canvas, that starts of hidden, how would I do this?

Select button in the Inspector. On the very bottom, You have OnClick() handlers. There You can reference method of some component on specific GameObject. So use it to reference method that will know about/be able to to find both Your canvases and then You will say something like:

CanvasA.gameObject.SetActive(false);
CanvasB.gameObject.SetActive(true);

You can also click the plus sign on OnClick, and drag over that panel. Then on the down arrow select GameObject.SetActive

Un checked is false and Check is true.

Whatever panel you want to start off hidden, then you just uncheck it from the very very top of the inspector.

No code needed.

Once you need code, then you need to learn enums and switch statements. :slight_smile: