Exemplo n.º 1
0
 void Awake()
 {
     #region SINGLETON
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
     #endregion
 }
Exemplo n.º 2
0
 public static void setAppMaster(Transform app)
 {
     _AppMaster = app.gameObject.GetComponent <_app>();
 }