Loading a scene
As mentioned, we won't have time to look at the code changes in the level of detail we previously did. Yet, we don't want to entirely miss important coding patterns, which means we will still review sections or lines of code of importance. In this first import of the GameManager
script, the important section of code we want to review is just how the scene is loaded. Perform the following instructions to review the code:
- Open the
GameManager
script from the Project window by locating the file in theAssets/FoodyGo/Scripts/Managers
folder and double-clicking on it. This will open the editor of your choice, orMonoDevelop
as the default. Scroll down to the
DisplaySplashScene
method. This section of code shows the important patterns we want to highlight. The method is shown here for those not able to open a script editor://display the Splash scene and then load the game start scene IEnumerator DisplaySplashScene() { SceneManager...