O'Reilly logo

Creating E-Learning Games with Unity by David Horachek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Analyzing code functionality

We can test our work now by switching to the MAIN scene file and clicking on Play. Notice right off the bat that there is one GameObject in the Hierarchy view, the _global object that holds the main camera, the Game, and the Player. We should also see the main menu pop up right away as shown in the following screenshot:

Analyzing code functionality

Clicking anywhere on the pop up sends a message to GameMgr to switch the level to Level1. Upon doing so, we should notice two GameObjects in the hierarchy view: the _global object and the level1 object (which has the terrain, monument, flag holders, and directional light) as shown in the following screenshot. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required