FabricManager

Description

This section shows all the functions that are available in the fabric manager class.

To call a manager function you can either use the Fabric.Instance accessor or the GetFabricManager.Instance() helper class function.

Functions

IsInitialised

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

Returns:

True if Fabric manager is initialised, false if not

Description:

Check to see if FabricManager is initialised (or exists within a GameObject)

 

Pause

void Fabric.FabricManager.Pause ( bool pause )

Parameters:

pause True will pause all components, false will unpause them

Description:

Pause playing all components.

 

Stop

void Fabric.FabricManager.Stop ( float fadeOut = 0.0f )

Parameters:

fadeOut Apply fade out before stopping

Description:

Stop playing all Components.

FadeInComponent

void Fabric.FabricManager.FadeInComponent ( string destinationComponent, float targetMS, float curve )

Parameters:

destinationComponent	Location of component in the hierarchy
targetMS	Amount of time to fade in in msec
curve	Type of curve to be used

Description:

Fade in a component.

FadeOutComponent

void Fabric.FabricManager.FadeOutComponent ( string destinationComponent, float targetMS, float curve )

Parameters:

destinationComponent	Location of component in the hierarchy
targetMS	Amount of time to fade out in msec
curve	Type of curve to be used

Description:

Fade out a component.

 

GetComponentByName

Component Fabric.FabricManager.GetComponentByName ( string destinationComponent )

Parameters:

destinationComponent Component location in the hierarchy (seperated by the "_" character)

Description:

Returns a component by its hierarchy name.

GetComponents

Component [] Fabric.FabricManager.GetComponents ( )

Returns:

Array of children components

Description:

Returns a list of all components.

 

GetComponentsByName

Component [] Fabric.FabricManager.GetComponentsByName ( string destinationComponent, GameObject parentGameObject )

Parameters:

destinationComponent Component location in the hierarchy (seperated by the "_" character)
parentGameObject game object associated with component instances

Returns:

Description:

Returns a component by its hiearchy name and associated game object.

LoadAsset

void Fabric.FabricManager.LoadAsset ( string prefabName, string destinationComponent )

Parameters:

prefabName Name of the prefab in the resource folder that contains the assets
destinationComponent Component location in the hiearchy (seperated by the "_" character)

Description:

Loads additional audio assets.

 

LoadAsset

void Fabric.FabricManager.LoadAsset ( GameObject component, string destinationComponent )

Parameters:

component GameObject with a Fabric component 
destinationComponent Component location in the hiearchy (seperated by the "_" character)

Description:

Loads a game object with a Fabric component into the hiearchy.

UnloadAsset

void Fabric.FabricManager.UnloadAsset ( string componentName, bool ignoreUnloadUnusedAssets = false )

Parameters:

componentName Name of the component in the hierarchy to unload 
ignoreUnloadUnusedAssets Ignore the Unity function call after the component has been unloaded. Set true to call this function manually.

Description:

Unloads assets that have been loaded (NOTE: it wont unload any assets that have been created underneath the FabricManager)

BakeComponentInstances

void Fabric.FabricManager.BakeComponentInstances ( )

Description:

 

 

CleanBakedComponentInstances

GetLanguageIndex

int Fabric.FabricManager.GetLanguageIndex ( )

Returns:

Current language index

Description:

Returns the current active language index.

GetLanguageName

string Fabric.FabricManager.GetLanguageName ( )

Returns:

Current language name

Description:

Returns the current active language name.

 

GetLanguageNames

string [] Fabric.FabricManager.GetLanguageNames ( )

Returns:

Array of name strings

Description:

Returns an array of all language names.

 

SetAudioComponentClip

void Fabric.FabricManager.SetAudioComponentClip ( string componentName, AudioClip audioClip, GameObject parentGameObject = null )

Parameters:

componentName Component location in the hierarchy (seperated by the "_" character)
audioClip audio clip to set
parentGameObject game object associated with component instances

Description:

Sets an audio component clip.

SetAudioComponentClip

void Fabric.FabricManager.SetAudioComponentClip ( string componentName, string resourceName, GameObject parentGameObject = null )

Parameters:

componentName Component location in the hierarchy (seperated by the "_" character)
resourceName audio clip resource name to set
parentGameObject game object associated with component instances

Description:

Sets an audio component clip.

RegisterCustomTimer

void Fabric.FabricManager.RegisterCustomTimer ( ICustomTimer customTimer )

Parameters:

customTimer Registers custom timer interface object

Description:

Registers custom timer.

RegisterMusicSyncNotifications

void Fabric.FabricManager.RegisterMusicSyncNotifications ( string name, MusicTimeSittings.OnBarHandler onBarCallback, MusicTimeSittings.OnBeatHandler onBeatCallback )

Parameters:

name Register with a music time settings by name
onBarCallback Callback called on every bar detected
onBeatCallback Callback called on every beat detected

 

Description:

This function allows to register with a specific Music time settings and get notifications on every bar or beat detected.