Test the code by pressing Play in Unity and then clicking on the Play UI button. The
SetGameState function that we just added to
GameManager should hide the
MenuCanvas. Oops! Something is wrong. Unity is displaying an error in the Console window. Something surely went wrong. Let's take a look at the red error message, which is shown here:
In your programming career, you will come across many issues with the games or applications that you are creating. I have deliberately asked you to follow my steps to cause this issue. We will learn with experience. Beginners in programming often rely on luck while sorting issues. They blindly ...