Difference between revisions of "Singleton Demo"
From Headbone Creative
(Initial page) |
Revision as of 02:36, 22 April 2013
This scene shows how both types of Singletons work. To drive this demo there are three additional scripts included in the Base script package.
- GameConfigDemo - ResourceSingleton
- ScoreKeeperDemo - MonoSingleton
- SingletonDemo - GUI, shows how to access the singletons
In the scene, before the game is run, only the camera and the DemoGUI show up in the scene view. When you run the game, both the GameConfigDemo and ScoreKeeperDemo will show up in the hierarchy. You can use the GUI to change the values stored in the singletons; after changing the values using the GUI, you can click on the singletons in the hierarchy view and see the changes that you've made.