[Unity development practice] - 2D project 1 - Ruby's Adventure in-game animation production (4-1)

1) Edible Guidelines

①Foreword
The complete development process of this project has written a detailed tutorial document in the teaching document of the official Unity project , but because the official document has been around for a while, there are errors in some places or the reader is using the Unity editor on their own machine. In the process of operation, I still encountered scattered problems, which can no longer correspond to the official tutorial. This blog is a supplement to the projects provided by the official website, as well as personal review and experience sharing.

This series of blogs is derived from the official tutorial, but it will definitely be higher than the official tutorial in the end, allowing readers to integrate the official tutorial and my own sublimation, and be able to independently develop a more complete and feasible game than the official tutorial.
The final development results and resources will also be open sourced on GitHub and Gitee.

②Official tutorial address
[ Official document - 9. Sprite animation ]
[ Official document - 10. World interaction - Missile ]

③How to deal with the relationship between this series of blogs and official tutorials

My personal suggestion is to first browse the blogs of this series of columns, get a preliminary impression of the precautions and key points, and then follow the official documents to operate step by step.

Because this series of blogs is a revision, supplement, and sublimation of the official tutorial, and the content of this series of blogs will not be particularly lengthy, it will take about 5-7 minutes to read it completely.
If you only look at the content of the article and pay attention to the places that need to be corrected, it will only take about 1 minute.

insert image description here

2) Detailed analysis of specific steps

Warm tip for the front row:
In the ninth chapter of the "Sprite Animation" tutorial, there is almost no need to add any more, and you can follow the operation completely.
But after making the animation of the robot, be sure to go back and clear the following five function panels.
This article mainly wants to sort out the functions of the commonly used function panels and the relationship between them in the animation production process.

2.1) Five functional panels that need to be clearly distinguished

1. Animator component

Corresponding to "Section 9.1" in the document
insert image description here

Animator 组件In order to play animation, similar to using other components (such as Rigibody 2D组件, Box Collider 2D组件etc.), you need to add it in Inspector窗口use Add Component.

insert image description here

2. Controller settings of the Animator component

Corresponding to the "9.1" chapter in the document
insert image description here

The most important settings on the Animator component are the Controller settings. The animation we made needs to be hooked here to be able to play
insert image description here

3. Animator Controller created by yourself

Corresponding to the "9.2" chapter in the document
insert image description here

The Animator Controller here is created by ourselves in the Project window. The animation we set for the game character is mainly set in the Controller we created ourselves, and then hooked to the Controller settings in the Animator component to achieve Play animation.
insert image description here

4. Animation window

The Animation window is mainly responsible for two things:

One is: use the Animation page of the Animation window, use Create New Clipthe "9.3-9.5" chapter in the corresponding document to create and make animation clips

insert image description here

insert image description here

The second is to customize the transitions or transitions between animation clips through the blend tree by using the Animation window's Animation page.

insert image description here
Corresponding to the "9.6-9.7" chapter in the document
insert image description here

Following the official documentation, you can quickly animate a bad robot and hook it up to the robot object for playback. However, it is essential to understand the production process and understand the above five functional panels.
The final production of the bad robot walking animation
insert image description here

As for the vertical animation, I will not put it here.
insert image description here
insert image description here

3) Summary

Because in the Unity editor, the names of the above five function panels are easily confused. If you do not clarify their functions and the relationship between them, then as the animation production tutorial becomes more and more complex and sophisticated, it may be possible There is a situation where people don't know what they are writing, so be sure to figure out these five entries after making the robot animation.
The next chapter is the sublimation of animation production.
insert image description here

Guess you like

Origin blog.csdn.net/weixin_52621323/article/details/126712988