void Awake()
 {
     if (instance == null) {
         instance = this;
     } else {
         Destroy(this);
     }
 }
	void Awake(){
		if (instance == null) {
			instance = this;
			DontDestroyOnLoad (gameObject);
		} else {
			Destroy(this);
		}

	}
示例#3
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }