• Menu
  • Overview
  • Runtime Classes
  • Enumerations
  • Editor Classes
  • Enumerations
  • History
  • Index
  • AnimationClip
  • All Members
  • Variables
  • frameRate
  • length
  • Constructors
  • AnimationClip
  • Functions
  • AddEvent
  • ClearCurves
  • SetCurve
  • Inherited Variables
  • hideFlags
  • name
  • Inherited Functions
  • GetInstanceID
  • Inherited Class Functions
  • Destroy
  • DestroyImmediate
  • DontDestroyOnLoad
  • FindObjectOfType
  • FindObjectsOfType
  • Instantiate
  • operator !=
  • operator ==
  • operator bool

AnimationClip.AddEvent  

Scripting > Runtime Classes > AnimationClip

function AddEvent (theEvent : AnimationEvent) : void

Description

Adds an animation event to the AnimationClip

This will add the event until playmode is exited or the player is quit. If you want to add an AnimationEvent to a clip persistently from the editor use UnityEditor.AnimationUtility.SetAnimationEvents.