Se o botão for pressionado unidade
using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;
public class MyButton : MonoBehaviour, IPointerDownHandler, IPointerUpHandler {
public bool buttonPressed;
public void OnPointerDown(PointerEventData eventData){
buttonPressed = true;
}
public void OnPointerUp(PointerEventData eventData){
buttonPressed = false;
}
}
Kevin