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