关闭

Legacy Animation Can’t Animate Material Property

标签: unitybug
347人阅读 评论(0) 收藏 举报
分类:

@(Bug记录)[UnityBug]

Legacy Animation Can’t Animate Material Property

问题描述

使用Animator可以控制材质的属性,但是Animator的初始化比较耗CPU,我们这里想继续使用Animation,但是Aniamtion自Unity 4.3之后就无法直接控制材质的属性了.

问题原因

Unity新版改变了Material 在 Aniamtion Clip 关键帧的格式,旧版Animation不支持.

The problem is that Unity has changed its Material keyframe formatting when it saves animation clips. If you need to use the legacy animation system here’s how to fix it:

Change animation type to 1

open the clip in a text editor, and replace classID 23 with classID 21

Still in the text editor, remove material. from the beginning of each Material attribute

Don’t know if this will fix the problem for everyone, but it worked wonders for me after banging my head against a wall for a while.

-Sterling Sr. Animator - Proletariat Inc.

解决方法

  1. Change this to “Force Text” [Edit->Project Settings->Editor] -> Asset Serialization
  2. 用文本编辑器打开生成的动画文件
  3. 将 ‘classID: 23’ 替换为’classID: 21’
  4. 将 ‘material.’ 替换为 ” (空串)
  5. 保存
  6. 在动画的Inspector面板上将Legacy选项勾上.
1
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:26337次
    • 积分:426
    • 等级:
    • 排名:千里之外
    • 原创:14篇
    • 转载:0篇
    • 译文:0篇
    • 评论:30条
    博客专栏
    最新评论