Fabric Manual EventsEventTrigger

EventTrigger

The Event trigger component is responsible for sending an event into Fabric with a specific action (i.e. Play, Stop, Set Volume/Pitch) and parameter values. Every component that is listening for that event within the Fabric hierarchy will respond accordingly.

An even trigger can be set to trigger when certain game object function is called or by code through the event manager.

NOTE: It is very important to remember that when a game object is used when posting an event it is associated with a component instance. The same game object MUST be used in order to control the instance.

 

Event name persistence

Both event trigger and listener components store the event name even if the event manager or event list component are not present in the scene. This will ensure that the event name will not reset to the default, “_UnSet_”, state unless the Clear button is selected.

Event name persistence

EventID option in EventTrigger

Added EventID option to event trigger component

OnEnter Mode

When the "Trigger On" option is selected to be Trigger Enter or Exit a Mode option is enabled with two options,

  • Default: This is the default behavior so anything that enters the trigger area will trigger the event.
  • On Audio Listener: Only a Fabric audio listener can trigger the event
  • On Tag: Only a game object with a specific Tag will post the event
OnEnter Mode

Inspector Elements

Properties

Description

TriggerOn

When will the trigger occur:

         Start

         Destroy

         Update

         Enable

         Disable

         TriggerEnter

         TriggerExit

         CollisionEnter

         CollisionExit

         MouseUp

         MouseDown

         MouseOver

        MouseExit

        Trigger On Update

        Trigger Enter 2D

        Trigger Exit 2D

        Collision Enter 2D

        Collision Exit 2D

       On Mouse Up As Button

       On Particle Collision

       On Joint Break

Action

The action to be taken when the event is received:

        PlaySound: Play component

        PlaySheduled: Schedule a Play component

        StopSound: Stop component

        StopScheduled: Schedule to stop a component

        PauseSound: Pause component

        UnpauseSound: Unpuase a paused component

        SetVolume: Set the component instancevolume

        SetPitch: Set the component instance pitch

        SetSwitch: Switch child on a switch component

        SetParameter: Set RTP or Timeline parameter

        SetMarker: Set parameter to a marker by name

        KeyOffMarker: Keyoff parameter from a marker

        SetFadeIn: Start fading in component

        SetFadeOut: Start fading out component

        SetPan: Set the component instance pan 2D value

        AddPreset: Add dynamic mixer preset

        RemovePreset: Remove dynamic mixer preset

        SetDSPParameter: Set DSP effect parameter

        RegisterGameObject: Register with given game object

        UnregisterGameObject: Unregister registered game object

        ResetDynamicMixer: Reset dynamic mixer

        AdvanceSequence: Advance sequence component

        ResetSequence:: Reset sequence

        SwitchPreset: Switch active preset to target preset

        SetTime: Set audio component time

        SetModularSynthParameter: Set modular synth parameter

        StopAll: Stop ALL component instances

        LoadAudio: Preload audio clips in the audio components

        UnloadAudio: Unload audio clips

        SetAudioClipReference: Set the dialog component audio clip reference

        Ignore: Event is ignored (useful for event override actions)

        SetMarker: Set RTP, Timeline or audio component to a marker

        KeyOffMarker: Key off parameter that is waiting on a marker

        TransitionToSnapshot: Transition to Unity's audio mixer snapshot

        MicStart: Start mic audio component listening to the microphone

        MicEnd: Stop mic audio component listeneing to the microphone

        SetVolumeProperty: Set the component volume property 

        SetPitchProperty: Set the component pitch property

        SetGlobalParameter: Set a global parameter value

        SetGlobalSwitch: Set a global switch value

        LoadAudioMixer: Load Unity's audio mixer

        UnloadAudioMixer: Unloads Unity's audio mixer

        SetGameObject: Set a component game object even if its not active

        UnsetGameObject: Unset a set component game object 

 Delay

Delays the event trigger by the time set in seconds

Probability (%)

Defines the percentage of the event trigger happening.

Post Event Limit

Limits the number of posts the event trigger can do

Ignore GameObject

Game Object is not used with the event (no 3D position update)

Add To Queue

Adds the event to a queue for processing when the event manager update is called

Override Parent GameObject

Allows to override the game object used by default (i.e. the game object that has the event trigger)

Trigger Event

Force a trigger of the event.

Set DSPParameter

When the Set DSPParameter action is selected the following extra properties are added to the event trigger

 

\ \

Properties

\
\

Description

\

Value

\

The value of the DSP effect set \ according to its range

\

Time

\

Time it will take for the DSP \ parameter to reach this value

\

Curve

\

The interpolation curve (0.5=Linear, Log < 0.5 > Exp)

The “Set DSPParameter” supports the following DSP effect parameters

\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

DSP

\
\

Parameter

Description

\
\

Low Pass

\

 

\

 

\

 

\

Cutoff Frequency

\
\

Lowpass cutoff frequency in hz. \ 10.0 to 22000.0. Default

\

Lowpass Resonance Q

\
\

Lowpass resonance Q value. 1.0 to 10.0. Default = 1.0.

\

High Pass

\

 

\

 

\

 

\

Cutoff Frequency

\

Highpass cutoff frequency in hz. 10.0 to 22000.0. Default

\
\

Highpass Resonance Q

\

Highpass resonance Q value. 1.0 to 10.0. Default = 1.0.

\
\

Echo

\

 

\

 

\

 

\

Delay

\

Echo delay in ms. 10 to 5000. \ Default = 500.

\

Decay Ratio

\

Echo decay per delay. 0 to 1. 1.0 = No decay, 0.0 = total decay (ie simple 1 line delay). Default = 0.5.L

\
\

Wet Mix

\

Volume of echo signal to pass to output. 0.0 to 1.0. Default = 1.0.

\

Dry Mix

\

Volume of original signal to pass \ to output. 0.0 to 1.0. Default = 1.0.

\

Distortion

\

 

\

 

\

 

\

Distortion           

\

Distortion value. 0.0 to 1.0. \ Default = 0.5.

\

Chorus

\

 

\

 

\

 

\

Dry Mix

\

Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.5.

\

Wet Mix 1

\

Volume of 1st chorus tap. 0.0 to 1.0. Default = 0.5.

\

Wet Mix 2

\

Volume of 2nd chorus tap. This \ tap is 90 degrees out of phase of the first tap. 0.0 to 1.0. Default = 0.5.

\
\

Wet Mix 3

\

Volume of 3rd chorus tap. This \ tap is 90 degrees out of phase of the second tap. 0.0 to 1.0. Default = 0.5.

\
\

Delay

\

The LFOs' delay in ms. 0.1 to \ 100.0. Default = 40.0 ms

\

Rate

\

The LFOs' modulation rate in Hz. 0.0 to 20.0. Default = 0.8 Hz.

\

Depth  

\

Chorus modulation depth. 0.0 to \ 1.0. Default = 0.03.

\

Feed Back

\

Chorus feedback. Controls how \ much of the wet signal gets fed back into the filter's buffer. 0.0 to 1.0. \ Default = 0.0.