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