在Unity 2019.4.38.f1c1以上的版本,创建的创建Animation Clip无法使用,作为组件的默认Clip的话,那么游戏运行的时候这个Clip其实是播不出来的,而且Console会报一条
“The AnimationClip ‘XXX’ used by the Animation component ‘XXX’ must be marked as Legacy.”
的警告信息,以及一条
“Default clip could not be found in attached animations list”
的提示信息。也就是说创建的.anim文件其实不能直接用在Animation组件中
解决方案:
1、2019年以后的版本
选中动画,在Inspector窗口下把动画的Normal
模式转换成Debug
模式
勾选Legacy
选项