unity3d 5.0中创建Animator Component时会自动生成的内容
程序员文章站
2022-05-17 16:47:25
...
转自官方unity5.0开发者文档:
If the Game Object doesn’t have an Animator Component already at this stage, a number of things happen automatically:
- A new Animator Controller asset will be will be created
- The new clip being created will be added into the Animator Controller as the default state
- An Animator Component will be added to the GameObject being animated
- The Animator Component will have the new Animator Controller assigned to it
The result of this automatic sequence is that you can begin the animation process of a new object by clicking the record button or selecting [Create New Clip], and all the required elements of the animation system are set up for you.
The diagram below shows how these pieces are assigned, starting from the new animation clip created in the Animation Window:
A new clip is created, and saved as an asset. The clip is automatically added as the default state to a new Animator Controller which is also saved as an asset. The Animator Controller is assigned to an Animator Component which is added to the GameObject.