Version: 5.6
Animator Controllers
Animator 窗口

Animator Controller资源

当您准备好使用动画剪辑时,需要使用__Animator Controller__使这些剪辑结合在一起。Animator Controller资源是在 Unity 内创建的,允许您为角色或对象维护一组动画。

项目文件夹中的Animator Controller资源
项目文件夹中的Animator Controller资源

从 Assets 菜单或从 Project 窗口中的 Create 菜单创建Animator Controller资源。

在大多数情况下,拥有多个动画并在满足某些游戏条件时在这些动画之间切换是很常见的。例如,只要按下空格键,就可以从行走动画切换到跳跃动画。但是,即使您只有一个动画剪辑,仍需要将其放入 Animator Controller 以便将其用于游戏对象。

The controller manages the various animation states and the transitions between them using a so-called State Machine, which could be thought of as a kind of flow-chart, or a simple program written in a visual programming language within Unity. More information about state machines can be found here. The structure of the Animator Controller can be created, viewed and modified in the Animator Window.

简单的Animator Controller
简单的Animator Controller

最终会通过连接__Animator__组件(其中引用了Animator Controller)将Animator Controller应用于对象。请参阅关于 Animator 组件和 Animator Controller 的参考手册页面来了解有关其用法的更多详细信息。

Animator Controllers
Animator 窗口