zoukankan      html  css  js  c++  java
  • UnityEngine中Animator相关类的说明

    ----------------------------------------------------------------------

    Animator

    这个单独写,比较多

    AnimationClip 
    有个SampleAnimation,可以让Go采样到某个动画时间(直接设置那个时间的姿势)
    有个只读的frameRate,帧率,采样频率(暂时不知道有什么应用)

    AnimatorClipInfo
    只包含AnimationClip和权重信息

    AnimationClipPair
    包含原始clip和目标clip,暂时不知道有什么用

    AnimatorControllerParameter
    貌似就是用来控制动画改变条件的
    --------------------------------------------------------------------
    AnimatorOverrideController
    动态替换状态用,不重启动画状态机
    AnimatorOverrideController is used to override clips from a controller to specialize some animations for a given avatar.Swapping Animator.runtimeAnimatorController with an AnimatorOverrideController based on the same AnimatorController at runtime doesn't reset state machine's current state.

    代码
    Animator animator = GetComponent<Animator>();
    AnimatorOverrideController overrideController = new AnimatorOverrideController();
    animator.runtimeAnimatorController = overrideController;
    --------------------------------------------------------------------
    AnimatorStateInfo
    可以通过Animator获取


    AnimatorTransitionInfo
    可以通过Animator获取
    --------------------------------------------------------------------
    AnimatorUtility
    里面有重要方法
    public static void OptimizeTransformHierarchy(GameObject go, string[] exposedTransforms);

    This function will remove all transform hierarchy under GameObject, the animator will write directly 

    transform matrices into the skin mesh matrices saving alot of CPU cycles.

    第一个方法会把骨骼transform去掉,参数exposedTransforms是保留的骨骼transform名称,被保留的每个transform
    会直接绑定到当前gameobject下

    public static void DeoptimizeTransformHierarchy(GameObject go);
    与第一个函数功能相反,恢复原样

    这两个函数的调用都会引起Animator重建
    A call to this function at runtime will re-initialize the animator.
    --------------------------------------------------------------------

    AnimationCurve 代码修改动画曲线时用,貌似很少用手动修改动画曲线
  • 相关阅读:
    使用Jmeter进行http接口测试
    Jmeter分布式压测
    Jmeter进阶技能-数据库信息,传递参数
    解决Mac OS X 升级10.10(Yosemite)后ADT(Eclipse)无法找到真机
    bug list
    【adb工具包】Android的工具包log日志抓取
    【AI模型测试】运行过程中出错和解决方案:ImportError: cannot import name '_validate_lengths'
    【AI模型测试】anaconda linux 常用命令、安装源、清理缓存(转)
    【AI模型测试】skimage库安装(转)
    【Python学习】pip 常用命令及控制台怎么查看python 及pip 和已安装包版本号(转)
  • 原文地址:https://www.cnblogs.com/nafio/p/9137356.html
Copyright © 2011-2022 走看看