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