![]() ![]() Remove the Start and Update functions, as we won’t need them.Then, we’ll open the Menu script and do the following: Attach this Menu script to the Canvas object.Create a new C# script called Menu in the Scripts folder.Let’s create a script to control those buttons: You can start this scene and click on the buttons, but nothing will happen right now, as we have to set those buttons up. Change the text on the QuitButton to “ Quit“.Move QuitButton to be below the PlayButton.Duplicate the PlayButton by selecting it and pressing the Ctrl+D hotkey.Next, we’ll create a button to quit our game: Then, let’s select the child Text object of the PlayButton, go to the Inspector, and set the TextMeshPro > Text to “ Play“. Position the PlayButton in the middle of the Canvas. ![]()
0 Comments
Leave a Reply. |