- Home /
Question by
ashulgach · Oct 21, 2019 at 10:27 PM ·
eventsystemevent triggeringevent-handlingevent-listenereventlistener
How do you fill an EventTrigger from a script?
Hi everyone,
I've searched every forum and every post on the internet but can't find any info on how to do this.
I added an EventTrigger component by an EditorScript and I'm trying to assign an object and call a function by script as well. After adding the entry, all documentation seems to end. I've attached what my Inspector looks like after I've added the EventTrigger component:
In the code, spawnedPrefab is an object that contains a script with the function that I'm trying to call. I posted an image with the code:
eventtrigger.jpg
(24.8 kB)
eventtriggercode.jpg
(64.2 kB)
Comment