AnimationUtility 动画工具


Editor utility functions for modifying animation clips

编辑器工具函数,用于修改动画剪辑

Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.
 注意:这是一个编辑器类,如果想使用它你需要把它放到工程目录下的Assets/Editor文件夹下。编辑器类在UnityEditor命名空间下。所以当使用C#脚本时,你需要在脚本前面加上 "using UnityEditor"引用。

Class Functions类函数

  • GetAnimationClips
    Returns the array of AnimationClips that are referenced in the Animation component
          返回动画组件中被引用的动画剪辑数组
  • SetAnimationClips
    Sets the array of AnimationClips to be referenced in the Animation component
          设置动画组件中被引用的动画剪辑数组
  • GetAnimatableObjects
    Returns a list of animatable objects attached to the game object (includes materials)
          返回一个列表,包含着附加到游戏物体的动画物体(包含材质)
  • GetAnimatablePropertiesFor...
    Returns a list of animatable properties for a specific animated object that is attached to gameObject
          返回一个列表,包含着附加到游戏物体上的特定动画的动画属性
  • GetAnimatableProperties
    Retrieves all animatable properties of all components / materials attached to the game object
          检索所有附加在游戏物体的组件/材质的动画属性
  • GetFloatValue
    Retrieves the current float value by sampling a curve value on a specific game object
          用在一个特定游戏物体上进行曲线值采样的方式检索当前浮点数值。
  • GetAllCurves
    Retrieves all curves from a specific animation clip.
          从一个特定动画剪辑中检索所有曲线
  • GetEditorCurve
    Unity automatic combines position curves, scale curves, rotation curves internally.
          Unity自动混合曲线坐标,缩放,旋转。
  • SetEditorCurve
    Unity automatic combines position curves, scale curves, rotation curves internally.
          Unity自动混合曲线坐标,缩放,旋转。
  • GetAnimationEvents
    Retrieves all animation events associated with the animation clip
          检索动画剪辑相关的所有动画事件。
  • SetAnimationEvents
    Replaces all animation events in the animation clip
          替换动画剪辑中所有的动画事件
  • CalculateTransformPath
    Calculates path from root transform to target transform.
          计算从初始transform到目标transform的路径
  • StartAnimationMode
    Starts animation mode, as used by the animation editor.
          开始动画模式,如使用动画编辑器。
  • StopAnimationMode
    Stops animation mode, as used by the animation editor.
          停止动画模式,如使用动画编辑器。
  • InAnimationMode
    Returns true if the editor is currently in animation mode.
          如果当前编辑器在动画模式则返回true


,