void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
void Awake() { if (instanceOf == null) { instanceOf = this; DontDestroyOnLoad(gameObject); } else { Destroy(this); return; } }