Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Animator.Play

Switch to Manual
public function Play(stateName: string, layer: int = -1, normalizedTime: float = float.NegativeInfinity): void;
public function Play(stateNameHash: int, layer: int = -1, normalizedTime: float = float.NegativeInfinity): void;

Parameters

stateName The name of the state the will be played.
layer The layer where the state is.
normalizedTime The normalized time at which the state will play.
stateNameHash The hash of the state.

Description

Plays a state.

This could be used to synchronize your animation with audio or synchronize an Animator over the network.