using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; public class UIButtonToggle : MonoBehaviour { public bool isPressed = false; public UnityEvent onPressed; public UnityEvent onReleased; void Awake() { Button button = GetComponent