// Use this for initialization void Start() { GameObject ManagerInfo; ManagerInfo = GameObject.Find("GameManager"); ScoreInterface = ManagerInfo.GetComponent <Interface>(); }
void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Player")) { // GAME OVER other.gameObject.SetActive(false); GameObject ManagerInfo; ManagerInfo = GameObject.Find("GameManager"); ManagerInfo.GetComponent <Interface>().PlayerDeath(); } }