public void OnPointerUp (PointerEventData data) { if (gameObject.name == "Attack Button") { playerAttack.AttackButtonReleased (); } }