To begin with the user interface for our game, we need a class that manages when and how to use UI elements, such as buttons and when to show the UI screen.
In order for our other code classes to get a reference to the
GameInfo class, we can create a
GameObject in the scene that holds a GameInfo script component. To do this, perform the following steps:
Assets/Scriptsfolder, right-click and select Create and then click on C# Script. Name this
GameInfoscript and select the
Awake. Save this file and go back to Unity.