Setting gap extrapolation
Blending clips

Easing-in and Easing-out clips

Ease-in and ease-out a clip to create a smooth transition between a clip and its surrounding gaps. To create an ease-in or ease-out transition, use one of the following methods:

  • Hold Control/Command and drag the start of a clip to the right to add an ease-in.

  • Hold Control/Command and drag the end of a clip to the left to add an ease-out.

  • Select the clip and, in the InspectorA Unity window that displays information about the currently selected GameObject, Asset or Project Settings, alowing you to inspect and edit the values. More info
    See in Glossary
    window, set either the Ease In Duration or the Ease Out Duration.

Ease-in and ease-out an Animation clip to transition between its animation and its gaps. All ease-in and ease-out transitions are represented by a linear curve.
Ease-in and ease-out an Animation clip to transition between its animation and its gaps. All ease-in and ease-out transitions are represented by a linear curve.

What an ease-in or ease-out transition effects differs depending on the track:

  • On an Animation track or an Animation Override track, ease-in an Animation clipAnimation data that can be used for animated characters or simple animations. It is a simple “unit” piece of motion, such as (one specific instance of) “Idle”, “Walk” or “Run”. More info
    See in Glossary
    to create a smooth transition between the animation in the gap before the clip and the Animation clip. Ease-out an Animation clip to create a smooth transition between the Animation clip and the animation in the gap after the clip. There are many factors that determine what animation occurs in the gap before and after an Animation clip. See Setting gap extrapolation for details.

  • On an Audio track, ease-in an Audio clipA container for audio data in Unity. Unity supports mono, stereo and multichannel audio assets (up to eight channels). Unity can import .aif, .wav, .mp3, and .ogg audio file format, and .xm, .mod, .it, and .s3m tracker module formats. More info
    See in Glossary
    to fade in the volume of the audio waveform. Ease-out an Audio clip to fade out the volume of the audio waveform specified by the Audio clip.

  • On a Playable track, ease-In a Playable clip to fade in the effect or script in the Playable clip. Ease-Out a Playable clip to fade out the effect or script in the Playable clip.

Although the Clips viewThe area in the Timeline Editor window where you add, position, and manipulate clips. More info
See in Glossary
represents an ease-in or ease-out as a single linear curve, every ease-in or ease-out transition is actually set to a gradually easing-in or easing-out curve by default. To change the shape of either the ease-in curve (labelled In) or the ease-out (labelled Out) curve, use the Blend Curves in the Inspector window.

Use the Blend Curves to customize ease-in or ease-out transitions
Use the Blend Curves to customize ease-in or ease-out transitions

Note that the Blend Curves might affect the blend areaThe area where two Animation clips, Audio clips, or Control clips overlap. The overlap creates a transition that is referred to as a blend. The duration of the overlap is referred to as the blend area. The blend area sets the duration of the transition. More info
See in Glossary
used for blending between two clips. The Ease In Duration and Ease Out Duration properties indicate whether the Blend Curves affect an ease-in, an ease-out, or a blend. For example, If the Ease Out Duration is editable, then the Blend Out curveIn a blend between two Animation clips, Audio clips, or Control clips, there are two blend curves. The blend curve for the out-going clip is referred to as the Blend Out curve. More info
See in Glossary
(labelled Out) affects the curve used by an ease-out transition. If the Ease Out Duration cannot be edited, then the Blend Out curve (labelled Out) affects the out-going clipThe first clip in a blend between two clips. The first clip, the out-going clip, transitions to the second clip, the incoming clip. More info
See in Glossary
in a blend between two clips.

Ease Out Duration cannot be edited, therefore the Out curve affects the blend area between two clips
Ease Out Duration cannot be edited, therefore the Out curve affects the blend area between two clips

To customize either the ease-in or ease-out transition, use the drop-down menu to switch from Auto to Manual. With Manual selected, the Inspector window shows a preview of the blend curve. Click the preview to open the Curve Editor below the Inspector window.

Select Manual and click the preview to open the Curve Editor
Select Manual and click the preview to open the Curve Editor

The Curve Editor is the same editor that is used to customize the shape of the blend curves when blending between clips.

When creating an ease-in or an ease-out with Animation clips, the Animation clip blends between its gaps and the Animation clip. The following factors affect the values of animated properties in the gaps surrounding an Animation clip:

  • The pre-extrapolate and post-extrapolate settings for the Animation clip and for other Animation clips on the same track.

  • Animation clips on other Animation tracks that are bound to the same GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
    See in Glossary
    .

  • The position or animation of the GameObject in the sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
    See in Glossary
    , outside the TimelineGeneric term within Unity that refers to all features, windows, editors, and components related to creating, modifying, or reusing cut-scenes, cinematics, and game-play sequences. More info
    See in Glossary
    Asset.

Gap extrapolation and easing clips

To successfully ease-in or ease-out an Animation clip, the gap extrapolationHow an Animation track approximates animation data in the gaps before and after an Animation clip. More info
See in Glossary
must not be set based on the Animation clip being eased-in or eased-out. The gap extrapolation must either be set to None or it must be set by other Animation clip.

For example, the following ease-in has no effect because the Pre-Extrapolate for the Victory_Dance clip is set to Hold. This means that the ease-in creates a transition between the first frame of the Animation clip and the rest of the Animation clip.

The gap is set to Hold from the Animation clip (circled). The ease-in has no effect.
The gap is set to Hold from the Animation clip (circled). The ease-in has no effect.
To ease-in from the Idle clip, set pre-extrapolate for the Victory_Dance clip to None. The ease-in gap uses the post-extrapolate mode from the Idle clip (circled).
To ease-in from the Idle clip, set pre-extrapolate for the Victory_Dance clip to None. The ease-in gap uses the post-extrapolate mode from the Idle clip (circled).

Overriding Animation tracks with ease-in and ease-out

If the gap extrapolation is set to None, and there is a previous track bound to the same GameObject, the animation in the gap is taken from the previous track. This is useful for creating a smooth transition between two Animation clips on different tracks.

For example, if two Animation tracks are bound to the same GameObject and a clip on the second track contains an ease-in, the ease-in creates a smooth transition between the animation on the previous track and the animation on the second track. To successfully override animation on a previous track, the gap extrapolation for the second track must be set to None.

The Animation clip on the first track is a repeated idle cycle where the humanoid GameObject stands still. The Animation clip in the second track eases-in the Victory_Dance motion and ease-out to return back to the idle cycle.
The Animation clip on the first track is a repeated idle cycle where the humanoid GameObject stands still. The Animation clip in the second track eases-in the Victory_Dance motion and ease-out to return back to the idle cycle.

Overriding the scene with ease-in and ease-out

In the scene, if a GameObject is controlled with an Animator ControllerControls animation through Animation Layers with Animation State Machines and Animation Blend Trees, controlled by Animation Parameters. The same Animator Controller can be referenced by multiple models with Animator components. More info
See in Glossary
, you can use an ease-in or ease-out transition between the Animation clip and the Animator Controller.

For example, if a Timeline AssetRefers to the tracks, clips, and recorded animation that comprise a cinematic, cut-scene, game-play sequence, or other effect created with the Timeline Editor window. A Timeline Asset does not include bindings to the GameObjects animated by the Timeline Asset. The bindings to scene GameObjects are stored in the Timeline instance. The Timeline Asset is Project-based. More info
See in Glossary
contains a single track with a single Animation clip and all its gap extrapolation settings are set to None, the gap uses the position or animation of the GameObject from the scene.

This position or animation is the GameObject as set in the scene. If the GameObject uses an Animator Controller to control its animation state, the gap is set to the current animation state. For example, if the GameObject is a character walking in the scene, a Timeline Asset could be setup to ease-in animation to override the walking animation state. The ease-out returns the GameObject to the animation state according to the Animator Controller.

A single Animation clip with all gap extrapolation set to None eases-in and ease-out the GameObject between its position or animation in the scene and the Animation clip
A single Animation clip with all gap extrapolation set to None eases-in and ease-out the GameObject between its position or animation in the scene and the Animation clip

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答