Show/hide UI elements

Code used in this lesson:
C#
1public GameObject pauseUI;
2
3public OnEnterPausePress() {
4	pauseUI.setActive(true);
5}
6
7public OnGameResumePress() {
8	pauseUI.setActive(false);
9}
10
11public OnGameExitPress() {
12	Application.Quit()
13}
In this episode, you'll create and script a pause button that shows and closes the pause menu. You’ll script functionality to buttons in pause menu creating advanced UI . By the end of this episode, you'll be able to control the visibility of UI elements in your games.
Part of Master Unity UI course on Coco Code Learn. Chapter 2: Get started - points counter
Master Unity UI thumbnail
Master Unity UI