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

Creating the setupLevel2 Prefab

The setupLevel2 Prefab will be activated when the user presses the start button on popup_Level2Start. It will finish the initialization of the mission for the level in the missionMgr script. Let's perform the following steps to create the setupLevel2 Prefab:

  1. Create a new Prefab named setupLevel2. Duplicate the SetupMissionOne script from mission one, and rename the duplicate SetupMissionTwo. Add an instance to setupLevel2.
  2. Inside MonoDevelop, change the class declaration to SetupMissionTwo as shown in the following line of code:
    public class SetupMissionTwo : MonoBehavior {
  3. We will use the same pattern for choosing random QuizNpc locators as we did for the flag locators in mission one. In addition to the QuizNpc Prefabs ...

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