Fabric Manual ComponentsSwitchComponent



The switch component selects which child component to trigger from an option that is set by the game. The option is ALWAYS the name of the component that is required to trigger.


Inspector Elements



Start On Switch

Starts the component playing when a switch occurs.

Switch Type

The switch types available:

-          SwitchOnPlay

-          SwitchOnEnd

-          SwitchOnSwitch

-          SwitchOnMusicSync

o   The switch will occur according to the transition type set in the music settings selected

Sync On Play

Sync to global music on the first play (if not it will be on the next switch). Only available if the switch type is set to SwitchOnMusicSync

Default Component

Currently selected component. Use this to select the default component.

Code Support

The Switch component provides the following event actions to be called from code,

- SetSwitch

Fabric.EventManager.Instance.PostEvent("NAME OF EVENT", Fabric.EventAction.SetSwitch, "CHILD COMPONENT NAME", gameObject);


Watch the following video explaining more about this Component