Example #1
0
 /// <summary>
 /// Ensure that there is an instance of this class somewhere in the scene.
 /// </summary>
 static void CreateInstance()
 {
     if (mInstance == null)
     {
         GameObject go = new GameObject("_UpdateManager");
         mInstance = go.AddComponent<GUpdateManager>();
         DontDestroyOnLoad(go);
     }
 }
Example #2
0
 void OnDestroy()
 {
     mInstance = null;
 }