Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

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

Animation.clip

Switch to Manual
public var clip: AnimationClip;

Description

The default animation.

var anim: Animation;

function Start() { anim = GetComponent.<Animation>(); anim.Play(anim.clip.name); // Wait for the animation to finish. yield WaitForSeconds (anim.clip.length); }