Answers for "event trigger by code unity"

C#
0

event trigger by code unity

EventTrigger trigger = GetComponentInParent<EventTrigger>();
 EventTrigger.Entry entry = new EventTrigger.Entry();
 entry.eventID = EventTriggerType.PointerClick;
 entry.callback.AddListener( (eventData) => { Foo(); } );
 trigger.triggers.Add(entry);
Posted by: Guest on June-23-2020

C# Answers by Framework

Browse Popular Code Answers by Language