private void MakeInstance() { if (_instance == null) { _instance = this; } else if (_instance != null && _instance != this) { Destroy(gameObject); } }
void MakeSingleton() { if (instance != null) { Destroy(this); } else { instance = this; DontDestroyOnLoad(this); } }