private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(this); } }
void Awake() { GameObject managerObject = GameObject.Find("ControllManager"); if (managerObject == null){ Debug.Log ("Nope"); return; } m_ControllManager = managerObject.GetComponent<ControllManager>(); if(m_ControllManager == null){ Debug.Log ("Haha"); return; } m_ControllManager.RegisterCharacter(this); Debug.Log ("Got it!"); }