📅  最后修改于: 2022-03-11 14:49:18.704000             🧑  作者: Mango
EventTrigger trigger = GetComponentInParent();
EventTrigger.Entry entry = new EventTrigger.Entry();
entry.eventID = EventTriggerType.PointerClick;
entry.callback.AddListener( (eventData) => { Foo(); } );
trigger.triggers.Add(entry);