Skip to main content

AnimationController

class ThaumielMapEditor.API.Animation

Overview​

Properties​

NameTypeAccessDescription
AnimatorsIReadOnlyList<Animator>getGets a read-only list of all UnityEngine.Animator components found on the schematic's server-side objects.
AttachedSchematicSchematicDatagetGets the attached ThaumielMapEditor.API.Data.SchematicData.

Methods​

SignatureReturnsDescription
Get(SchematicData)AnimationControllerGets or creates an ThaumielMapEditor.API.Animation.AnimationController for the…
Play(string, int)voidPlays an animation state by name on the animator at the given index.
Play(string, float, int)voidPlays an animation state by name on the animator at the given index.
Play(string, bool, int)voidSets a boolean parameter on the animator at the given index.
Play(string, bool, float, int)voidSets a boolean parameter on the animator at the given index.
Play(string, string)voidPlays an animation state on the animator matching the given name.
Play(string, string, float)voidPlays an animation state on the animator matching the given name.
Stop(int)voidStops playback on the animator at the given index.
Stop(string)voidStops playback on the animator matching the given name.

Properties​

Animators​

Type: IReadOnlyList<Animator> Access: get

Gets a read-only list of all UnityEngine.Animator components found on the schematic's server-side objects.


AttachedSchematic​

Type: SchematicData Access: get

Gets the attached ThaumielMapEditor.API.Data.SchematicData.


Methods​

Get​

Get
public AnimationController Get(SchematicData schematic)

Gets or creates an ThaumielMapEditor.API.Animation.AnimationController for the given ThaumielMapEditor.API.Data.SchematicData.

Parameters​

NameTypeDescription
schematicSchematicDataThe schematic to look up.

Returns​

AnimationController β€” The existing or newly created ThaumielMapEditor.API.Animation.AnimationController.


Play​

Play
public void Play(
string stateName,
int animatorIndex
)

Plays an animation state by name on the animator at the given index.

Parameters​

NameTypeDescription
stateNamestringThe state to play.
animatorIndexintThe index of the animator to use.

Play​

Play
public void Play(
string stateName,
float speed,
int animatorIndex
)

Plays an animation state by name on the animator at the given index.

Parameters​

NameTypeDescription
stateNamestringThe state to play.
speedfloatThe speed to play the animation at.
animatorIndexintThe index of the animator to use.

Play​

Play
public void Play(
string animParam,
bool state,
int animatorIndex
)

Sets a boolean parameter on the animator at the given index.

Parameters​

NameTypeDescription
animParamstringThe animator parameter name.
stateboolThe boolean value to set.
animatorIndexintThe index of the animator to use.

Play​

Play
public void Play(
string animParam,
bool state,
float speed,
int animatorIndex
)

Sets a boolean parameter on the animator at the given index.

Parameters​

NameTypeDescription
animParamstringThe animator parameter name.
stateboolThe boolean value to set.
speedfloatThe speed to play the animation at.
animatorIndexintThe index of the animator to use.

Play​

Play
public void Play(
string stateName,
string animatorName
)

Plays an animation state on the animator matching the given name.

Parameters​

NameTypeDescription
stateNamestringThe state to play.
animatorNamestringThe name of the animator GameObject to target.

Play​

Play
public void Play(
string stateName,
string animatorName,
float speed
)

Plays an animation state on the animator matching the given name.

Parameters​

NameTypeDescription
stateNamestringThe state to play.
animatorNamestringThe name of the animator GameObject to target.
speedfloatThe speed to play the animation at.

Stop​

Stop
public void Stop(int animatorIndex)

Stops playback on the animator at the given index.

Parameters​

NameTypeDescription
animatorIndexintThe index of the animator to stop.

Stop​

Stop
public void Stop(string animatorName)

Stops playback on the animator matching the given name.

Parameters​

NameTypeDescription
animatorNamestringThe name of the animator GameObject to stop.