Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Creating E-Learning Games with Unity

You're reading from  Creating E-Learning Games with Unity

Product type Book
Published in Mar 2014
Publisher
ISBN-13 9781849693424
Pages 246 pages
Edition 1st Edition
Languages
Author (1):
David Horachek David Horachek
Profile icon David Horachek

Table of Contents (17) Chapters

Creating E-Learning Games with Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Introduction to E-Learning and the Three Cs of 3D Games 2. Interactive Objects and MissionMgr 3. Mission One – Find the Facts 4. Mission One – Future Proofing the Code 5. User Interfaces in Unity 6. NPCs and Associated Technology 7. Mission Two – Testing a Player's Learning 8. Adding Animations 9. Synthesis of Knowledge 10. An Extensible Game Framework Pattern in Unity Index

Implementing a system to connect object references


Level 1 signals level 2 to load when the Level 1 completes pop up's Next button is pressed; it signals for the _level1 GameObject to be destroyed and the _level2 GameObject to be loaded from the LEVEL2 scene file. We must refactor the start-up logic of _level2 so that we can find and connect some object references to GameObjects in the _global hierarchy.

  1. Create a new script named Level2Extras, and attach an instance of it to the _level2 GameObject. This script will be used to directly access certain GameObjects inside _level2 for enabling and disabling.

  2. Give the Level2Extras script the following three public GameObject references; these are the assorted GameObjects that this script will be in charge of activating:

    public GameObject raceStartup;
    public GameObject setupLevel2;
    public GameObject LevelLogicObj;
    
  3. Drag-and-drop the LevelLogicObj object from the _level2 GameObject hierarchy into the LevelLogicObj reference of the Level2Extras script...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}