2

这似乎是一个常见问题,由于谷歌或论坛搜索中的噪音量,几乎不可能找到我的具体案例的答案。

我已将对象从搅拌机导入统一。这些物体里面有更小的物体。那些较小的物体上有动画,这是统一创建的。如果我打开动画窗口(Window->Animation)并按下播放 - 我可以看到对象的正确移动。动画设置为在检查器中自动播放,剔除类型始终为动画。但是,如果我玩游戏,则不会播放动画。为什么?

4

3 回答 3

1

将动画添加到主要对象,然后为较小的对象设置动画...

您必须将动画组件放到主要对象上,然后为小部分设置动画...

这很重要...

它应该工作

于 2014-06-13T07:16:14.587 回答
0

I know it's kinda late, but this is for others having this same issue.

Animations in Unity have types (2 of which I know). Type 1 can be attached to an object using the Animation Component. Type 2 can only be used in Animators (Mechanim).

Animations imported with FBX files are type 2 (and as far as I know, animation type in FBX files can NOT be changed), so they will usually not work when attached directly to an object with "Animation". They should be used with Animators and Animator Controllers. Just create a New Controller and add the animation. It will become the default animation state and play automatically.

If you want it to loop, click on the FBX asset, and in the Animation tab, choose Loop Time and click Apply.

于 2014-06-07T17:24:51.127 回答
0

我找不到任何基于统一检查员的答案。目前,我最好的选择是创建新脚本,并在 update() 检查动画是否正在播放。如果没有,那就玩吧。非常低效,所以对于将来可能偶然发现这篇文章的人,我建议您尝试添加this.animation.play()设置部分脚本。

于 2013-04-15T08:39:38.997 回答