protected void Start() { //singleton pattern if (Instance == null) { Instance = this; } else { Debug.Log(this + " singleton already created. Exterminating.."); Destroy(this); } hideable = GetComponent <IHideable>(); Hide(); animator = GetComponent <Animator>(); }
protected void Start() { Instance = this; //todo add check for multiple objects with that script animator = GetComponent <Animator>(); }