Skip to content

API > EventHandler


EventHandler⚓︎

A simple event handler utility. You can attach your functions as Listeners to an event. This meant to provide a simple interface with events in unity. Also, it can be used to create and handle custom events. The EventHandler instance can be used as a variable and passed around.

Members⚓︎

Properties⚓︎

Name Description
EventHandler.countPropertyReadonly Property The number of the handlers that attached to this event handler instance.

Constructor⚓︎

Name Description
EventHandler()Constructor

Methods⚓︎

Name Description
EventHandler.Add(function) Method Adds a new function as a handler. The value must be a function type to properly attach it.
EventHandler.Invoke(parameters=nil) Method Invokes the event. This calls all the functions that attached to this event.
EventHandler.RemoveAllListeners() Method Removes all the event listeners (functions) attached to this event.