AnimancerLayer.

TryPlay(Object) Method

Summary

Stops all other animations on the same layer, plays the animation registered with the `key`, and returns that state. Or if no state is registered with that `key`, this method does nothing and returns null.
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
AnimancerLayer

Syntax

public AnimancerState TryPlay(Object key)

Remarks

The animation will continue playing from its current Animancer.AnimancerState.Time. To restart it from the beginning you can simply set the returned state's time to 0.

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

Parameters

Name Type Description
key Object

Return Value

Type Description
AnimancerState