Animation animation creation in Unity

Record the learning about Animation:


1. Create an Animation animation for the first time:
(1) Drag the Sprite directly to the Hierarchy panel;
(2) Select the dragged Sprite, then Windows->Animation or directly Ctrl+ 6, and the Animation panel will pop up;
(3) In the Animation panel, there is a Create button, click to create an animation, the suffix is ​​.anim, select the save folder to rename and save, and a controller with the same name as New Animation and Sprite will be saved at the same time. After the creation is complete, the dragged Sprite will be automatically attached to the Animator component;
insert image description here
(4) Click the Add Property button, select Transform's Position, Rotation, and Scale to edit the translation, rotation, and scaling of each Sprite; (5
) Click Add Property button to select the type of animation created by Sprite Renderer. For example, Sprite is the most basic, switch between different Sprites to achieve the effect of animation, Size and Color are used to change the size and color of the object
insert image description here
insert image description here
insert image description here
; The script is bound to the animation object, and the script method modifier can be of any type after testing, but the method parameter can only be one at most, which can be int, bool, string, or Object. Optionally add events at any frame.
insert image description here


2. Non-first creation of Animation animation:

  • If you want to modify the animation, directly drag the animation prefab with the Animator component in the Project panel to the Hierarchy panel, and open the Animation panel as above.

Guess you like

Origin blog.csdn.net/weixin_42205218/article/details/105935944