获得Animator当前播放的AnimationClip
2017-06-08 20:50
316 查看
AnimatorClipInfoDescriptionInformation about clip being played and blended by the Animator.获得Animator的当前AnimationClip和混合动画的信息
Variables
clip | Returns the animation clip played by the Animator.返回当前播放的AnimationClip |
weight | Returns the blending weight used by the Animator to blend this clip.返回该AnimationClip在播放中所有AnimationClip的权重 |
Animator
GetCurrentAnimationClipState | Gets the list of AnimationInfo currently played by the current state.获取当前状态播放的当前动画信息列表。 |
GetCurrentAnimatorStateInfo | Gets the current State information on a specified AnimatorController layer.获取指定的AnimatorController层的当前状态信息。 |
Animator anim = new Animator();//获得Animator AnimatorClipInfo[] animatorClipInfo = anim.GetCurrentAnimatorClipInfo(0);//获得播放列表 AnimatorStateInfo animatorStateInfo = anim.GetCurrentAnimatorStateInfo(0); foreach (AnimatorClipInfo a in animatorClipInfo) { AnimationClip an = a.clip; } [/code]第三种方法 AnimationClip clip = NpcAnimator.runtimeAnimatorController.animationClips[0]; Debug.Log("animationClips[0]" + clip.name);
相关文章推荐
- 写 RealPlayer Visual 插件如何获得当前播放的文件路径和信息?
- 论坛源码推荐(4月10日):简单获得设备当前位置 高性能低内存地播放GIF
- 获取当前播放Animator的动画Name
- Unity 从Animator组件中获得AnimationClip
- 获取当前播放Animator的动画时间
- 获得音乐文件的播放时间的长度 和 当前播放时间
- Unity3d 从Animator组件中获得AnimationClip
- Animation获得当前播放的第几帧
- iphone获得当前系统时间
- 获得下拉框Combobox当前选中的项
- delphi中获得当前时间
- js javascript 获取url,获得当前页面的url,静态html文件js读取url参数
- Android获得当前应用包名、当前activity的名字、推断是否是系统桌面、service类
- CAD2016获得当前布局代码C#
- 获得程序当前路径System.getProperty("user.dir")
- oc中获得当前月有多少天
- c#中怎么获得当前路径
- 如何获得Oracle当前日期的年或月的第一天和最后一天
- MFC获得当前运行程序的路径
- 根据当前日期,获得本周的周一及周日日期即本周的开始时间和结束时间