Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


loop

Determines whether the animation clip should loop continuously.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Property
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public bool loop { get; set; }

Remarks

When set to true, the animation clip seamlessly repeats from the beginning when it reaches the end. This is useful for cyclical animations like walking, running, or idle animations.
When false, the animation plays once and stops at the last frame. This is typically used for one-time actions like attacks, jumps, or cutscene animations.
Note: This property works in conjunction with ModelImporterClipAnimation.loopTime and ModelImporterClipAnimation.loopPose to control different aspects of looping behavior.