Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

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

AnimationCurve

Namespace: UnityEngine

Description

A collection of curves form an AnimationClip.

Variables

keysAll keys defined in the animation curve.
lengthThe number of keys in the curve. (Read Only)
postWrapModeThe behaviour of the animation after the last keyframe.
preWrapModeThe behaviour of the animation before the first keyframe.
this[int]Retrieves the key at index. (Read Only)

Constructors

AnimationCurveCreates an animation curve from arbitrary number of keyframes.

Functions

AddKeyAdd a new key to the curve.
EvaluateEvaluate the curve at time.
MoveKeyRemoves the keyframe at index and inserts key.
RemoveKeyRemoves a key.
SmoothTangentsSmooth the in and out tangents of the keyframe at index.

Static Functions

EaseInOutAn ease-in and out curve starting at timeStart, valueStart and ending at timeEnd, valueEnd.
LinearA straight Line starting at timeStart, valueStart and ending at timeEnd, valueEnd.