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

Implementing the GameMgr script

Let's implement the GameMgr script so that it can manage the loading (and future unloading) of scene files and assets. Implementing this in a flexible way now will make our game more extensible when we have future levels to add. It can be implemented by performing the following steps:

  1. Recall that we have already created an empty script named GameMgr and attached it to the Game GameObject. If you have not already done this, no worries; just create a new script now, and attach it.
  2. In order for GameMgr to do its job, it will act as a mediator between popupMenu and the scene files of the game. When GameMgr receives a message to change its state, it will load and unload the appropriate scene files.
  3. It is important that ...

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