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
- AnimancerComponent
Syntax
public AnimancerState TryPlay(Object key)
Remarks
The animation will continue playing from its current
Animancer.AnimancerState.Time
.
If you wish to force it back to the start, 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 |