Being able to switch scenes and maintain state is common task, but it seems to require a bit of work in Unity. Open up the Unity editor to the Navigation scene and complete the following:
- Open up the Assets/HoloCore/Scripts folder and create a new script called Singleton. Go to the book's downloaded source Code/Chapter_10 folder, copy the contents of the Singleton.cs file, and paste it into your new script. A Singleton is common pattern in Unity for creating an object you only want one of and when you never want that object destroyed. If you are new to Singleton, it will be in your best interest to spend some time and review the class.
- Create a new script in the same folder called SceneController and replace the generated ...