Ejemplo n.º 1
0
 public static T GetInstance()
 {
     if (instance == null)
     {
         instance = PersistentUObjectHelper.CreateComponent <T>();
     }
     return(instance);
 }
Ejemplo n.º 2
0
 void Awake()
 {
     PersistentUObjectHelper.AddGameObject(gameObject);
     Destroy(this);
 }