private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } }
void Start() { if (Instance != null) { GameObject.Destroy(gameObject); } else { GameObject.DontDestroyOnLoad(gameObject); Instance = this; } }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } }
void Start() { if (Instance != null) { GameObject.Destroy(gameObject); } else { GameObject.DontDestroyOnLoad(gameObject); Instance = this; } }