Exemple #1
0
 private void Start()
 {
     clanky = GameObject.Find("Clanky").GetComponent <Clanky>();
     if (clanky == null)
     {
         clanky = GameObject.FindObjectOfType <Clanky>();
     }
 }
Exemple #2
0
 public void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }