Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


keys

All keys defined in the animation curve.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public Keyframe[] keys { get; set; }

Remarks

This lets you clear, add or remove any keys from the array. If keys are not sorted by time, they will be automatically sorted on assignment.
Note that the array is "by value", i.e. getting keys returns a copy of all keys and setting keys copies them into the curve.
Additional Resources: Keyframe struct, AnimationCurve.AddKey, AnimationCurve.RemoveKey functions.