Skip to content

CustomEvent.cs

Matthew Coulter edited this page Aug 17, 2022 · 1 revision

CustomEvent

class/ Inherits from:MonoBehaviour

Description

This is a generic class for easily binding UNityEvents and MonoBehaviour methodsFor example, you can make a sound play every time a collision happens without even writing a line of code!

Subclasses

Subclass Description
EventBind This class handles linking of the Event enum trigger (MonoBehaviour method) and an action (UnityEvent) that is configured in the inspector

Enums

Enum Description
Event The enum for MonoBehaviour methods which values are chosen from in the inspector

Public Properties

Property Description Type
eventType; The Event method chosen from the enum which lines up with a MonoBehaviour method Event
unityEvent; The UnityEvent which is a set of actions that happen when the method is called UnityEvent
bindings The list of bindings to be configured in the inspector (because dictionaries don't show in the inspector!) List