Unity EventTrigger 动态添加事件
PointerEnter
entry = new Entry();
entry.eventID = EventTriggerType.PointerEnter;
entry.callback.AddListener((baseEventData) =>
{Debug.Log("PointerEnter");
});
trigger.triggers.Add(entry);
*EventTriggerType 为UI组件可触发的事件类型,如需添加其他事件修改EventTriggerType 即可。