AnimancerLayer.

Play(AnimancerState) Method

Summary

Stops all other animations on the same layer, plays the `state`, and returns it.
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
AnimancerLayer

Syntax

public AnimancerState Play(AnimancerState state)

Remarks

The animation will continue playing from its current Animancer.AnimancerState.Time. To restart it from the beginning you can use ...Play(state).Time = 0;.

If the layer currently has 0 Animancer.AnimancerNode.Weight, this method will automatically set it to 1. This can be disabled by setting Animancer.AnimancerLayer.SetLayerWeightOnPlay to false.

This method is safe to call repeatedly without checking whether the `state` was already playing.

Parameters

Name Type Description
state AnimancerState

Return Value

Type Description
AnimancerState