示例#1
0
 void Awake()
 {
     if (_instance == null)
     {
         DontDestroyOnLoad(this.gameObject);
         _instance = this;
     }
     else if (_instance != this)
     {
         Debug.Log("Too many garden switchers");
         Destroy(this.gameObject);
     }
 }
 void Awake()
 {
     if(_instance == null)
     {
         DontDestroyOnLoad(this.gameObject);
         _instance = this;
     }
     else if(_instance != this)
     {
         Debug.Log("Too many garden switchers");
         Destroy(this.gameObject);
     }
 }