void Start() { SingletonTest mySingleton = SingletonTest.GetInstance(); mySingleton.DoStuff(); SingletonMonoTest myMonoSingleton = SingletonMonoTest.GetInstance(); }
public void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(this.gameObject); } else { Destroy(this.gameObject); } }