Humanoid Control for Unity v4
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Passer.EventHandler Class Reference


Easy universal way to attach script functions to events and statuses

Event handlers are used in many Passer components like ControllerInput, CollisionEventHandler, TriggetEventHandler, HeadTarget and Handle to call functions based on events.


An event handler can be edited by pressing on the button. For every event It is possible to attach multiple event Handlers. When an event Handler has been defined, a new empty button will appear below which you can use to add an additional event Handler.

When an event Handler has been selected, a number of fields become visible:

Event Type

The labels of this drop down field can be differen depending on the event, but in general they work as follows:


The target GameObject in the scene on which the Method is called.


The method to call on the GameObject. For each component on the GameObject an entry will be listed in the drop down. When selecting a component, the desired function can be chosen from the list of available functions.

Method Parameter

This can be set to a constant value or to From Event. In the second option, the parameter value will come from the event itself. Like the status of the button pressed the GameObject which has entered the trigger collider or the GameObject to which the user is looking.


Depending on the parameter type additional settings can be set in the Options section.

Inheritance diagram for Passer.EventHandler:
Passer.BoolEvent Passer.FloatEvent Passer.GameObjectEvent Passer.IntEventHandler Passer.Vector3Event

Public Types

enum  Type {
  Never , OnStart , OnEnd , WhileActive ,
  WhileInactive , OnChange , Continuous
 The different types of events when the function is called More...
enum  OverrideMode { Prepend , Append , Replace }

Public Member Functions

virtual void Update ()

Public Attributes

Type eventType = Type.Continuous
 The event type for the function call
bool eventNetworking = false
 For future use :-)
FunctionCall functionCall
 The function to call
bool boolInverse = false
 Negate the boolean state before calling event trigger
OverrideMode overrideMode

Protected Member Functions

void UpdateAnimationParameter ()
virtual void UpdateVoid ()
virtual void UpdateBool ()
virtual void UpdateInt ()
virtual void UpdateFloat ()
virtual void UpdateString ()
virtual void UpdateVector3 ()
virtual void UpdateGameObject ()
virtual void UpdateRigidbody ()
virtual void UpdateString (string s)
virtual void UpdateStringBool (string s)
virtual void UpdateStringFloat (string s)
virtual void UpdateStringInt (string s)
bool CheckCondition (bool active, bool changed, bool valueChanged)

Protected Attributes

bool initialized
bool _boolValue
bool boolChanged = true
int _intValue
bool intChanged
float _floatValue
bool floatChanged


virtual bool boolValue [getset]
bool isDead [get]
 True when the eventHandler is dead and can be removed More...

Member Enumeration Documentation

◆ Type

The different types of events when the function is called


The function is never called.


The function is called when the event starts.


The function is called when the event ends.


The function is called every frame while the event is active.


The function is called every frame while the event is not active.


The function is called every time the event changes.


The functions is called every frame.

◆ OverrideMode


Prepend this handler before existing handlers.


Append this handler after existing handlers.


Replace the topmost handler with this handler.

Property Documentation

◆ isDead

bool Passer.EventHandler.isDead

True when the eventHandler is dead and can be removed

A function is dead when it does nothing. This is when the functionCall is not defined or when the target of the functionCall is empty

The documentation for this class was generated from the following file: