addListener<K>(event, listener): void
K
event
listener
void
Add an event listener to the script.
K extends keyof EventMap
EventMap
event - The event to listen to.
(e) => void
e
listener - The function to call when the event is fired.
This can only be used while the script is initializing.
Last updated 3 months ago
script.addListener("Render3DEvent", (event) => { // ... });