Inheritance: UnityEngine.MonoBehaviour
Ejemplo n.º 1
0
 /**
  * If a default UI already exists, destroy the new one.
  */
 void Awake()
 {
     if (instance)
     {
         Debug.LogWarning("CastDefaultUI: Duplicate UI controller found - destroying.");
         DestroyImmediate(gameObject);
         return;
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
 /**
  * If a default UI already exists, destroy the new one.
  */
 void Awake() {
   if (instance) {
     Debug.LogWarning("CastDefaultUI: Duplicate UI controller found - destroying.");
     DestroyImmediate(gameObject);
     return;
   } else {
     instance = this;
     DontDestroyOnLoad(gameObject);
   }
 }