/// <summary> /// Shows canvas when player steps into the trigger /// </summary> public void OnTriggerEnter(Collider other) { TriggerSender hitbox = other.GetComponent <TriggerSender>(); if (hitbox != null && hitbox.GetReciever().GetRecieverGameObject().Equals(player.gameObject) && player.bodyHitbox.Equals(other.gameObject)) { Debug.Log("Open"); dialogCanvas.Open(); } }