要创建新的__动画剪辑__,请在场景中选择一个游戏对象,然后打开 Animation 窗口__(顶部菜单:__Window > Animation > __Animation__)。
如果游戏对象尚未分配任何动画剪辑,则会在 Animation 窗口时间轴区域的中心位置显示“Create”按钮(请参阅图 1:创建新动画剪辑)。
单击 Create 按钮。Unity 会提示您将新的空动画剪辑保存在 Assets 文件夹中。
保存这个新的空动画剪辑时,Unity 会执行以下操作:
现在已为您设置好动画系统所有必需的元素,因此接下来可以开始动画化游戏对象。
如果已经为游戏对象分配一个或多个动画剪辑,“Create”按钮将不可见。此情况下,现有剪辑的其中之一将在 Animation 窗口中可见。要在动画剪辑之间切换,请使用 Animation 窗口左上角的菜单(在播放控件下方)(请参阅图 2:添加更多动画剪辑)。
要在包含现有动画的游戏对象上创建新的动画剪辑,请从此菜单中选择 Create New Clip。Unity 将再次提示您保存新的空动画剪辑,然后您才能处理该动画剪辑。
上述步骤会自动设置相关组件和引用。但是,了解部件的连接方式会很有用。
下图以 Animation 窗口中创建新动画剪辑为起点,展示了 Unity 如何分配这些部件(请参阅图 3:动画剪辑图)。
创建新的动画剪辑后,现在可以看到:
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.