Wenn die Taste gedrückt wird, ist die Einheit
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