对UIButtonMessage进行修改
void OnPress (bool isPressed) { if (enabled) { if (((isPressed && trigger == Trigger.OnPress) || (!isPressed && trigger == Trigger.OnRelease))) Send(); } try { if (isPressed) { //按住 } else { //松手 } } catch (Exception e) { Debug.Log(e.Message); } }
时间: 2025-01-14 00:36:03