Version: 5.6
Creating a New Animation Clip
Using Animation Curves

Animating a Game Object

Once you have saved the new Animation clip Asset, you are ready to begin adding keyframes to the clip. To begin editing an Animation Clip for the selected Game Object, click on the Animation Record button. This will enter Animation Record Mode, where changes to the Game Object are recorded into the Animation Clip.

Record button
Record button

Вы можете остановить режим анимации (Animation Mode) в любое время, снова щелкнув кнопку Animation Mode. Это вернет Game Object в состояние, которое было до входа в режим анимации.

The changes you make to the GameObject will be recorded as keyframes at the current time shown by the red line in the Animation Window.

You can animate any property of the object by manipulating the object while in Animation Record Mode. Moving, Rotating or Scaling the object will add corresponding keyframes for those properties in the animation clip. Adjusting values directly in the object’s inspector will also add keyframes while in Record mode. This applies to any property in the inspector, including numeric values, checkboxes, colours, and most other values.

Any animated properties of the GameObject are shown listed in the property list on the left-hand side of the Animation Window. Properties which are not animated are not shown in this window. Any new properties that you animate, including properties on child objects, are added to the property list area as soon as you start animating them.

Transform properties are special in that the .x, .y, and .z properties are linked, so that curves are added three at a time.

You can also add animatable properties to the current GameObject (and its children) by clicking the Add Property button. Clicking this button shows a pop up list of the GameObject’s animatable properties. These correspond with the properties you can see listed in the inspector.

The animatable properties of a GameObject are revealed when you click the Add Property button
The animatable properties of a GameObject are revealed when you click the Add Property button

В режиме анимации (Animation Mode) красная вертикальная линия показывает какой кадр анимационного клипа (Animation Clip) просматривается в данный момент. Инспектор и окно Scene показывают Game Object в этом кадре анимационного клипа. Значение анимированных свойств в этом кадре также показывается в колонке справа от его имени.

В режиме анимации красная вертикальная линия показывает текущий просматриваемый кадр
В режиме анимации красная вертикальная линия показывает текущий просматриваемый кадр
Current frame
Current frame

Time Line

Вы можете щелкнуть где-нибудь на временной шкале (Time Line) для просмотра или модификации данного кадра в анимационном клипе. Числа на временной шкале показываются в секундах и кадрах, т.е. 1:30 означает 1 секунда и 30 кадров.

Time Line
Time Line

Animation Mode

В режиме анимации (Animation Mode) вы можете перемещать, вращать или масштабировать Game Object в окне Scene. Это автоматически создаст анимационные кривые (Animation Curves) для свойств позиции, поворота и масштаба если они до этого времени не существовали, и ключи на этих кривых будут созданы в текущем кадре просмотра для сохранения значений изменённого Transform’а.

You can also use the Inspector to modify any of the other animatable properties of the Game Object. This too will create Animation Curves as needed, and create keys on those Animation Curves at the currently previewed frame to store your changed values.

Keyframe Creation

Также вы можете вручную создать ключевой кадр (keyframe) нажав кнопку Keyframe button. Это создаст ключ для всех кривых отображаемых в данный момент в окне Animation. Если вы хотите видеть кривые только для части свойств в списке свойств, вы можете выбрать эти свойства. Это полезно для добавления ключей только к нужным свойствам.

The Add Keyframe Button
The Add Keyframe Button
Creating a New Animation Clip
Using Animation Curves