EventManager

Description

Properties

Instance

static EventManager Instance [get]

Description:

Returns an instance of the audio event manager singleton, creating one if not already been created.

 

Functions

IsInitialised

static bool Fabric.EventManager.IsInitialised () [static]

Returns:

Returns true if the event manager is initialised. 

Description:

Function to check if the event manager is initialised

RegisterListener

bool Fabric.EventManager.RegisterListener ( IEventListener listener, string eventName )

Parameters:

listener: listener interface to register with manager
eventName: Event name for listener to listen for

Returns:

true if registration was successful, false if not

Description:

Registers a listener to an event

UnregisterListener

bool Fabric.EventManager.UnregisterListener ( IEventListener listener, string eventName )

Parameters:

listener: listener interface to register with manager
eventName: Event name for listener is listening for

Returns:

true the listener was unregistered was successful, false if not

Description:

Unregisters an event listener

AddEventNames

void Fabric.EventManager.AddEventNames ( string[] events )

Parameters:

events: Array of event names

Description:

Adds event names into the event manager list

AddEventNamesFromFile

void Fabric.EventManager.AddEventNamesFromFile ( string filename )

Parameters:

filename: Name of text file to read events from

Description:

Loads event names from a text file

RemoveEventNames

void Fabric.EventManager.RemoveEventNames ( string[] events )

Parameters:

events: array with event names to remove

Remove event names

FindEventNameIndexByName

int Fabric.EventManager.FindEventNameIndexByName ( string eventName )

Parameters:

eventName: event to locate in the event name array

Returns:

Index of event name

Description:

Finds the index of an event present in the event list

NumOfEventsInQueue

int Fabric.EventManager.NumOfEventsInQueue ( )

Returns:

returns number of events queued.

Description:

Returns the number of events in the queue waiting to be processed.

GetIDFromEventName

static int Fabric.EventManager.GetIDFromEventName ( string eventName ) [static]

Parameters:

eventName: event name to return its ID 

Returns:

hash key of event name

Description:

Returns hashed ID from event name.

IsEventActive

bool Fabric.EventManager.IsEventActive ( string eventName, GameObject parentGameObject )

Parameters:

eventName: event name to check
eventName: game object associated with a component instance

Returns:

true if event is active, false if its not

Description:

Checks if an event is active (i.e. playing)

IsNullOrDestroyed

bool Fabric.EventManager.IsNullOrDestroyed ( object obj )

Parameters:

obj: object to check

Returns:

true if object is destroyed and nulled, false if its not

Description:

Checks if an object is null or destroyed.

PostEvent

bool Fabric.EventManager.PostEvent ( string eventName )

bool Fabric.EventManager.PostEvent ( string eventName, GameObject parentGameObject )

bool Fabric.EventManager.PostEvent ( string eventName, GameObject parentGameObject, InitialiseParameters initialiseParameters )

bool Fabric.EventManager.PostEvent ( string eventName, EventAction eventAction )

bool Fabric.EventManager.PostEvent ( string eventName, EventAction eventAction, object parameter )

bool Fabric.EventManager.PostEvent ( string eventName, EventAction eventAction, object parameter, GameObject parentGameObject )

bool Fabric.EventManager.PostEvent ( string eventName, EventAction eventAction, GameObject parentGameObject )

bool Fabric.EventManager.PostEvent ( string eventName, EventAction eventAction, object parameter, GameObject parentGameObject, InitialiseParameters initialiseParameters, bool addToQueue = false )

Parameters:

eventName Name of event to post
eventAction: EventAction to perform 
parameter: Parameter required by the event action 
parentGameObject: GameObject registered with event, allocates a component instance and tracks 3D position automatically.
initialiseParameters: InitialiseParameters is a container of all initialise parameters that can be set. 
addToQueue: Add event to queue and process it when an event listener is available.

Returns:

true if post has been successful, false if not

Description:

A collection of functions used to post an event

PostEventNotify

bool Fabric.EventManager.PostEventNotify ( string eventName, OnEventNotify onEventNotify)

bool Fabric.EventManager.PostEventNotify ( string eventName, GameObject parentGameObject, OnEventNotify onEventNotify)

bool Fabric.EventManager.PostEvent ( string eventName, GameObject parentGameObject, InitialiseParameters initialiseParameters, OnEventNotify onEventNotify )

bool Fabric.EventManager.PostEvent ( string eventName, EventAction eventAction, OnEventNotify onEventNotify )

bool Fabric.EventManager.PostEvent ( string eventName, EventAction eventAction, object parameter, OnEventNotify onEventNotify )

bool Fabric.EventManager.PostEvent ( string eventName, EventAction eventAction, object parameter, GameObject parentGameObject, OnEventNotify onEventNotify )

bool Fabric.EventManager.PostEvent ( string eventName, EventAction eventAction, GameObject parentGameObject, OnEventNotify onEventNotify )

Parameters:

eventName Name of event to post
eventAction: EventAction to perform 
parameter: Parameter required by the event action 
parentGameObject: GameObject registered with event, allocates a component instance and tracks 3D position automatically.
initialiseParameters: InitialiseParameters is a container of all initialise parameters that can be set. 
addToQueue: Add event to queue and process it when an event listener is available.
onEventNotify: OnEventNotify delegate to register EventNotificationType events

Returns:

true if post has been successful, false if not

Description:

A collection of functions used to post an event

PostEvent (by ID)

bool Fabric.EventManager.PostEvent ( int eventID )

bool Fabric.EventManager.PostEvent ( int eventID, GameObject parentGameObject )

bool Fabric.EventManager.PostEvent ( int eventID, GameObject parentGameObject, InitialiseParameters initialiseParameters )

bool Fabric.EventManager.PostEvent ( int eventID, EventAction eventAction )

bool Fabric.EventManager.PostEvent ( int eventID, EventAction eventAction, object parameter )

bool Fabric.EventManager.PostEvent ( int eventID, EventAction eventAction, object parameter, GameObject parentGameObject )

bool Fabric.EventManager.PostEvent ( int eventID, EventAction eventAction, GameObject parentGameObject )

bool Fabric.EventManager.PostEvent ( int eventID, EventAction eventAction, object parameter, GameObject parentGameObject, InitialiseParameters initialiseParameters, bool addToQueue = false )

Parameters:

eventID Id of event to post.
eventAction: EventAction to perform 
parameter: Parameter required by the event action 
parentGameObject: GameObject registered with event, allocates a component instance and tracks 3D position automatically.
initialiseParameters: InitialiseParameters is a container of all initialise parameters that can be set. 
addToQueue: Add event to queue and process it when an event listener is available.

Returns:

true if post has been successful, false if not

Description:

A collection of functions used to post an event

SetDSPParameter

void Fabric.EventManager.SetDSPParameter ( string eventName, DSPType dspType, string parameterName, float value, float time = 0.0f, float curve = 0.5f, GameObject parentGameObject = null)

void Fabric.EventManager.SetDSPParameter ( int eventID, DSPType dspType, string parameterName, float value, float time = 0.0f, float curve = 0.5f, GameObject parentGameObject = null )

 

Parameters:

eventName: Event name to set the DSP effect
dspType: DSP effect type to set parameter 
parameterName: Name of the parameter to set
value: Value to set
time: Duration in seconds to reach value
curve: Type of curve (Log < 0.5 > Exp, 0.5 = linear)
parentGameObject: Set DSP effect on component instance associated with a specific game object

Description:

Set DSP parameter

SetParameter

Functions:

void Fabric.EventManager.SetParameter ( string eventName, string parameterName, float value, GameObject parentGameObject = null )

void Fabric.EventManager.SetParameter ( int eventID, string parameterName, float value, GameObject parentGameObject = null )

 

Parameters:

eventName/eventID: Event name or hashed ID to set the parameter
dspType: DSP effect type to set parameter 
parameterName: Name of the parameter to set
value: Value to set
time: Duration in seconds to reach value
curve: Type of curve (Log < 0.5 > Exp, 0.5 = linear)
parentGameObject: Set DSP effect on component instance associated with a specific game object

Description:

Sets component parameter, this could either be an RTP or a Timeline parameter

SetGlobalParameter

Functions:

bool Fabric.EventManager.SetGlobalParameter(string parameterName, float value)

 

Parameters:

parameterName Name of the parameter
value: value to set

 

Returns:

true if setting the value was successful, false if not

Description:

Sets a global parameter by name

GetGlobalParameter

Functions:

float Fabric.EventManager.GetGlobalParameter(string parameterName)

 

Parameters:

parameterName: Name of the parameter

Returns:

Value of the global parameter

 

Description:

Returns the value of a global parameter, by name

SetGlobalSwitch

Functions:

bool Fabric.EventManager.SetGlobalSwitch(string globalSwitchName, string switchName)

 

Parameters:

globalSwitchName: Name of the global switch group
switchName: Name of the switch to set

 

Returns:

true if switch wassuccessful, false if not

Description:

Sets a global switch group to a specific switch