private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         DestroyImmediate(gameObject);
     }
 }
Exemple #2
0
 void Awake()
 {
     _cursor = GameObject.Find("Cursor").GetComponent <CursorCtrl>();
 }