之前在Asset store上面下载了一个模型,有动画,可是想在Animation窗体编辑动画,插入关键帧的时候,出现了一点问题,发现动画切片是可读的。

在网上查了一下解决方式,后来在这里找到了答案:

http://answers.unity3d.com/questions/187907/how-to-add-keyframes-on-imported-read-only-animati.html

大概解决的方法例如以下:

You have to duplicate the animationclip-asset. Select the animation clip in your imported model and press ctrl+d. Now you should have a seperate AnimationClip file. This animation clip have to be
added to an instance of your model. Just drag your model asset into the scene and replace the referenced AnimationClip in the animation array. After you added the AnimationClip to your model you can open the animation editor window and select your model in
the hierarchy. Select the right animation on top (if there are multiple) and you can edit anything in this animation. All changes will be saved to the .anim file since that's the animation you're using now.

You can't replace the AnimationClip on the imported model itself but you can create a new prefab out of the instanciated model in your scene. This prefab will used the assigned AnimationClip.

I have created a special AssetPostProcessor which automatically extracts the .anim files and add them automatically to the model prefab since we have 90+ animations ;)

先在Project视图中选中fbx的动画文件,然后按ctrl+d,复制动画切片,然后把模型拖到Scene视图中,然后选中Scene视图中的模型,手动改动模型所引用到的各种动画切片到你复制的动画切片,之后就会发现是可编辑的了。

插入关键帧的回调有两个办法:

1、在Hierarchy窗体中选中模型,然后打开Animation窗体,选中一个动画切片,然后将动画时间调整到须要的位置,然后按后面那个带加号的button会出现一个对话框,让你选择插入的回调函数,我这里是事先在对象上挂了一个脚本,所以这里会列出来这个脚本里的全部函数,如图:

二、是模型加载之后,进行avatar匹配,之后在Project视图中选中模型文件,然后在Inspector视图中选中Animation选项,然后在以下的Clips片段中选中你想插入的动画,然后将以下预览的红线拉到你想插入动画的帧,然后点击那个带加号的button。之后会出现一个插入函数的对话框,填入一个函数名,之后就能够在这个对象上挂一个脚本,然后填写对应的函数名就可以有关键帧回调,如图:

最新文章

  1. JavaScript获取客户端计算机硬件及系统等信息的方法
  2. Effective C++ -----条款43:学习处理模板化基类内的名称
  3. Linux下SVN安装配置
  4. Spring集成JPA提示Not an managed type
  5. Java垃圾回收器
  6. WireShark过滤语法
  7. (?m) 可以让.去匹配换行
  8. js+css实现模态层效果
  9. Django 1.6 基于类的通用视图
  10. 莱特币ltc在linux下的多种挖矿方案详解
  11. javascript动画效果之匀速运动(修订版)
  12. 网络协议笔记-网络层-ARP协议
  13. 2.SDL规范文档
  14. angular应用容器化部署
  15. python之shell
  16. 使用eclipse初步学习vue.js的基本操作 ①
  17. P1140 相似基因 最长公共子序列
  18. jquery中append、prepend, before和after方法的区别
  19. DHCP协议和PXE
  20. svn 部署 配置

热门文章

  1. 【设计模式】享元模式(Flyweight)
  2. python爬虫模块之HTML解析模块
  3. hadoop 安装 错误及解决方法
  4. FineReport——笔记
  5. 后台传入的boolean类型到前台alert为String类型了(解决方法)
  6. redis之(三)redis的数据类型
  7. 【JBPM4】State 节点
  8. Django学生管理系统添加学生时,报错Not Found: /POST
  9. bzoj 3295 CDQ求动态逆序对
  10. jquery 获取鼠标坐标