Example #1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Example #2
0
 private void Awake()
 {
     Instance = this;
     GameObject.DontDestroyOnLoad(this.gameObject);
 }