Unity-jump-proj
@ -0,0 +1,69 @@
|
||||
* [About Timeline](index.md)
|
||||
* [Timeline overview](tl_about.md)
|
||||
* [Using the Timeline window](wf_about.md)
|
||||
* [Creating a Timeline Asset and Timeline instance](wf_instance.md)
|
||||
* [Recording basic animation with an Infinite clip](wf_rec_anim.md)
|
||||
* [Converting an Infinite clip to an Animation clip](wf_conv_infinite.md)
|
||||
* [Animating a humanoid](wf_char_anim.md)
|
||||
* [Using an Animation Override track and Avatar masking](wf_mask.md)
|
||||
* [Nesting Timeline instances](wf_nested.md)
|
||||
* [Timeline window](tl_window.md)
|
||||
* [Timeline Preview and Timeline Selector](tl_selector.md)
|
||||
* [Timeline Playback Controls](tl_play_cntrls.md)
|
||||
* [Track List and Track Headers](trk_list_about.md)
|
||||
* [Adding Tracks](trk_add.md)
|
||||
* [Selecting Tracks](trk_select.md)
|
||||
* [Duplicating Tracks](trk_dup.md)
|
||||
* [Deleting Tracks](trk_delete.md)
|
||||
* [Locking Tracks](trk_lock.md)
|
||||
* [Muting Tracks](trk_mute.md)
|
||||
* [Reordering Tracks and Rendering Priority](trk_reorder.md)
|
||||
* [Using Track Groups](grp_use.md)
|
||||
* [Collapsing and Expanding Track Groups](grp_hide.md)
|
||||
* [Locking Track groups](grp_lock.md)
|
||||
* [Clip Edit modes and the Clips view](clp_about.md)
|
||||
* [Panning and Zooming the Clips View](clp_pan_zoom.md)
|
||||
* [Adding Clips](clp_add.md)
|
||||
* [Inserting Clips](clp_insert.md)
|
||||
* [Selecting Clips](clp_select.md)
|
||||
* [Positioning Clips](clp_position.md)
|
||||
* [Tiling Clips](clp_tile.md)
|
||||
* [Duplicating Clips](clp_dup.md)
|
||||
* [Trimming Clips](clp_trim.md)
|
||||
* [Splitting Clips](clp_split.md)
|
||||
* [Resetting Clips](clp_reset.md)
|
||||
* [Changing Clip Play Speed](clp_speed.md)
|
||||
* [Setting Gap Extrapolation](clp_gap_extrap.md)
|
||||
* [Easing-in and Easing-out Clips](clp_ease.md)
|
||||
* [Blending Clips](clp_blend.md)
|
||||
* [Matching clip offsets](clp_match.md)
|
||||
* [Curves View](crv_about.md)
|
||||
* [Hiding and Showing Curves](crv_hide.md)
|
||||
* [Navigating the Curves View](crv_nav.md)
|
||||
* [Selecting Keys](crv_keys_sel.md)
|
||||
* [Adding Keys](crv_keys_add.md)
|
||||
* [Editing Keys](crv_keys_edit.md)
|
||||
* [Changing Interpolation and Shape](crv_keys_interp.md)
|
||||
* [Deleting Keys](crv_keys_del.md)
|
||||
* [Timeline Settings](tl_settings.md)
|
||||
* [Timeline Inspector](insp_about.md)
|
||||
* [Setting Timeline Properties](insp_tl.md)
|
||||
* [Setting Track Properties](insp_trk.md)
|
||||
* [Activation Track Properties](insp_trk_act.md)
|
||||
* [Animation Track Properties](insp_trk_anim.md)
|
||||
* [Setting Clip Properties](insp_clp.md)
|
||||
* [Activation Clip Properties](insp_clp_act.md)
|
||||
* [Animation Clip Common Properties](insp_clp_anim_com.md)
|
||||
* [Animation Clip Playable Asset Properties](insp_clp_anim_plyb.md)
|
||||
* [Audio Clip Properties](insp_clp_aud.md)
|
||||
* [Control Clip Common Properties](insp_clp_ctrl_com.md)
|
||||
* [Control Clip Playable Asset Properties](insp_clp_ctrl_plyb.md)
|
||||
* [Playable Director Component](play_director.md)
|
||||
* [Samples](smpl_about.md)
|
||||
* [Annotation marker](smpl_custom_annotation.md)
|
||||
* [Video track](smpl_custom_video.md)
|
||||
* [Time dilation track](smpl_custom_time.md)
|
||||
* [Tween track](smpl_custom_tween.md)
|
||||
* [Text track](smpl_custom_text.md)
|
||||
* [Defining custom USS styles](uss_styles.md)
|
||||
* [Timeline Glossary](tl_gloss.md)
|
@ -0,0 +1,101 @@
|
||||
# Clip Edit modes and the Clips view
|
||||
|
||||
Use the Clips view to add, position, and manipulate clips on each track in the Track list. The selected Clip Edit mode determines how clips interact when you add, move, or delete them.
|
||||
|
||||

|
||||
|
||||
_The Clip Edit modes (green) and the Clips view (red)_
|
||||
|
||||
## Clips and the Clips view
|
||||
|
||||
In the Clips view, each clip has a colored accent line that identifies the type of clip:
|
||||
|
||||
* Activation clips are green.
|
||||
* Animation clips are blue.
|
||||
* Audio clips are orange.
|
||||
* Control clips are turquoise.
|
||||
* Playable clips are white.
|
||||
|
||||
A clip based on data, such as an Animation clip or an Audio clip, displays arrows that indicate when the clip has been trimmed to exclude part of its source animation, waveform, or other data. For example, if an Animation clip uses only part of its full key animation, white arrows indicate that key animation exists before the start or after the end of the clip.
|
||||
|
||||

|
||||
|
||||
_Small arrows (circled) indicate that data exists before the start or after the end of the area defined by the clip_
|
||||
|
||||
To resize a clip and view its hidden data, either right-click the clip and select **Match Content** from the context menu, or select the clip and modify its clip timing properties in the Inspector window. When you resize a clip, the selected Clip Edit mode determines how the surrounding clips are affected.
|
||||
|
||||
## Clip Edit modes
|
||||
|
||||
Select a Clip Edit mode to choose how clips are added, positioned, and trimmed within the Clips view, or when modifying clip timing properties in the Inspector window. There are three Clip Edit modes that affect most clip editing features: Mix mode (default), Ripple mode, and Replace mode.
|
||||
|
||||

|
||||
|
||||
_Clip Edit modes are Mix (default and selected), Ripple, and Replace mode_
|
||||
|
||||
You can also temporarily switch between Clip Edit modes. This is useful if, for example, you want to temporarily use Ripple mode to offset the content of a track while you position clips. To temporarily switch between Clip Edit modes, hold down the following keyboard keys:
|
||||
|
||||
* Hold 1 to temporarily switch to Mix mode.
|
||||
* Hold 2 to temporarily switch to Ripple mode.
|
||||
* Hold 3 to temporarily switch to Replace mode.
|
||||
|
||||
### Mix mode
|
||||
|
||||
Use Mix mode to add, position, and trim clips without moving or replacing adjacent clips. Mix mode creates blends between intersecting clips. Mix mode is the default Clip Edit mode.
|
||||
|
||||

|
||||
|
||||
_Timeline window with Mix mode as the selected Clip Edit mode. The position cursor (circled) indicates where you drag to position the clip._
|
||||
|
||||
In Mix mode, when you hover over a selected clip in the Clips view, the cursor changes to indicate the action that you can perform. The action depends on the part of the clip that you hover over:
|
||||
|
||||
* When you hover over the start of a selected clip, the cursor changes to a trim cursor. The trim cursor indicates the area to drag to trim the start of the clip.
|
||||
* When you hover over the middle of a selected clip, the cursor changes to a position cursor and indicates the area to drag to position the clip.
|
||||
* When you hover over the end of a selected clip, the cursor changes to a trim cursor. The trim cursor indicates the area to drag to trim the end of the clip.
|
||||
|
||||
In Mix mode, if you drag to trim or position a clip and it intersects another clip, the cursor changes to a white arrow that points towards the blend being created. There are three possible cursors depending on whether the blend is created at the beginning of the clip, at the end of the clip, or at both the beginning and end of the clip.
|
||||
|
||||

|
||||
|
||||
_The white arrow cursor indicates that dragging Clip 2A to the right creates a blend, at the end of the clip, between Clip 2A and Clip 2B._
|
||||
|
||||
### Ripple mode
|
||||
|
||||
Use Ripple mode to add, position, and trim a clip while affecting the subsequent clips on the same track. Positioning or trimming clips in Ripple mode preserves the gaps between subsequent clips.
|
||||
|
||||

|
||||
|
||||
_Timeline window with Ripple mode as the selected Clip Edit mode. The position cursor (circled) indicates where you drag to position the clip._
|
||||
|
||||
In Ripple mode, when you hover over a selected clip in the Clips view, the cursor changes to indicate the action that you can perform. The actions and areas are similar to Mix mode:
|
||||
|
||||
* When you hover over the start of a selected clip, the cursor changes to a trim cursor. The trim cursor indicates the area to drag to trim the clip relative to its start.
|
||||
* When you hover over the middle of a clip, the cursor changes to a position cursor and indicates the area to drag to position the clip.
|
||||
* When you hover over the end of a clip, the cursor changes to a trim cursor. The trim cursor indicates the area to drag to trim the clip relative to its end.
|
||||
|
||||
In Ripple mode, when you click and drag to trim or position a clip, the cursor switches to a yellow arrow that points towards the affected clips and gaps. A yellow line indicates the ripple point. When you drag to trim a clip, dragging left and right changes the duration of the selected clip and repositions subsequent clips and gaps after the ripple point.
|
||||
|
||||

|
||||
|
||||
_For example, the yellow arrow cursor indicates that trimming the start of Clip 2A in Ripple mode changes the clip duration and affects the clips and gaps after the ripple point: Clip 2B and Clip 2C.]_
|
||||
|
||||
### Replace mode
|
||||
|
||||
Use Replace mode to add, position, and trim a clip while cutting or replacing intersecting clips.
|
||||
|
||||

|
||||
|
||||
_Timeline window with Replace mode as the selected Clip Edit mode. The position cursor (circled) indicates where you drag to position the clip._
|
||||
|
||||
In Replace mode, when you hover over a selected clip in the Clips view, the cursor changes to indicate the action that you can perform. The actions and areas are similar to Mix mode:
|
||||
|
||||
* When you hover over the start of a selected clip, the cursor changes to a trim cursor. The trim cursor indicates the area to drag to trim the clip relative to its start.
|
||||
* When you hover over the middle of a clip, the cursor changes to a position cursor and indicates the area to drag to position the clip.
|
||||
* When you hover over the end of a clip, the cursor changes to a trim cursor. The trim cursor indicates the area to drag to trim the clip relative to its end.
|
||||
|
||||
In Replace mode, when you drag to position a clip, the clip becomes translucent so that you can view overlapping clips. If the clip being positioned overlaps other clips, the cursor changes to a red arrow and red replacement lines indicate where each overlap occurs. Releasing the clip cuts the underlying clip at each red overlap.
|
||||
|
||||

|
||||
|
||||
_For example, the red arrow cursor indicates that dragging Clip 2A to the right overlaps Clip 2B. Releasing the clip cuts Clip 2B at the point where the overlap occurs._
|
||||
|
||||
In Replace mode, trimming a clip is similar to positioning a clip. When you drag to trim a clip and it intersects another clip, the cursor changes to a red arrow and a red replacement line indicates where the overlap occurs. Releasing the trim cuts the intersecting clip at the red replacement line.
|
@ -0,0 +1,21 @@
|
||||
# Adding clips
|
||||
|
||||
The Timeline window supports different methods of adding clips to tracks, depending on the type of track, where you click, and whether a clip or track is already selected.
|
||||
|
||||
The quickest method to add a clip is to right-click on an empty area within a track and select the appropriate Add option from the context menu. Depending on the track, the options for adding a clip change.
|
||||
|
||||

|
||||
|
||||
_Context menu for adding an Activation clip._
|
||||
|
||||
There are other ways to add clips:
|
||||
|
||||
* Select a clip option from the Track menu in the Track Header to add a clip at the location of the Timeline Playhead.
|
||||
* Drag an animation Source Asset from the Project window to an empty area in the Timeline window to automatically create an Animation track and add an Animation clip.
|
||||
* Drag an animation Source Asset from the Project window to an existing track in the Timeline window to add an Animation clip to the same track.
|
||||
* Drag an audio Source Asset from the Project window to an empty area in the Timeline window to automatically create an Audio track and add an Audio clip.
|
||||
* Drag a GameObject with a PlayableDirector component to create a nested Timeline instance. This automatically creates a Control track and adds a Control clip for the nested Timeline instance.
|
||||
* Drag a Prefab from the Project window to an empty area in the Timeline window to add a Prefab instance to your Timeline instance. This automatically creates a Control track and adds a Control clip for the Prefab instance.
|
||||
* Drag a GameObject with a Particle component to add a particle effect to your Timeline instance. This automatically creates a Control track and adds a Control clip for the duration of the Particle effect.
|
||||
|
||||
When you add a clip, the [selected Clip Edit mode](clp_about.md) determines how the added clip interacts with surrounding clips. For example, if you add an Animation clip or an Audio clip in Mix mode and the added clip intersects a clip on the same track, Timeline [creates a blend](clp_blend.md).
|
@ -0,0 +1,37 @@
|
||||
# Blending clips
|
||||
|
||||
Blend two clips on the same track to create a smooth transition between two Animation clips, two Audio clips, or two Playable clips. To blend two clips, select the Mix Clip Edit mode and position or trim one clip until it overlaps an adjacent clip.
|
||||
|
||||
In a blend, the first clip is referred to as the **outgoing clip** and the second clip is referred to as the **incoming clip**. The area where the outgoing clip transitions to the incoming clip is referred to as the **blend area**. The blend area sets the duration of the transition.
|
||||
|
||||

|
||||
|
||||
_The blend area shows the transition between the outgoing clip and incoming clip_
|
||||
|
||||
Although the Clips view represents a blend area as a single linear curve, the transition between clips is actually comprised of two blend curves. The blend curve for the outgoing clip is referred to as the **Blend Out** curve. The blend curve for the incoming clip is referred to as the **Blend In** curve. By default, each blend curve is automatically set to an ease-in and ease-out curve.
|
||||
|
||||

|
||||
|
||||
_Use Blend Curves to customize the blend area_
|
||||
|
||||
Use the **Blend Curves** in the Inspector window to change the shape for either the Blend In or Blend Out curve of the selected clip. However, the Inspector window only allows you to edit the properties of one clip at a time. You cannot simultaneously customize both blend curves from the same blend area.
|
||||
|
||||
To customize the **Blend Curves** for the transition between two clips:
|
||||
|
||||
1. Select the outgoing clip to customize its Blend Out curve (labelled **Out**).
|
||||
2. Select the incoming clip to customize its Blend In curve (labelled **In**).
|
||||
|
||||
To customize either the Blend Out curve or Blend In curve, 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 curve preview to open the Curve Editor below the Inspector window.
|
||||
|
||||

|
||||
|
||||
_Select Manual and click the curve preview to open the Curve Editor_
|
||||
|
||||
Use the Curve Editor to customize the shape of the blend curve. By default, the blend curve includes a key at the beginning of the curve and a key at the end of the curve. The Curve Editor provides the following different methods of modifying the blend curve:
|
||||
|
||||
* Select the key at the start or end of the blend curve and use the tangent handles to adjust the interpolation between keys.
|
||||
* Add additional keys to change the shape of the blend curve by adding more interpolation points. Adding keys in the Curve Editor is the same as [adding keys in the Curves view](crv_keys_add.md).
|
||||
* Right-click a key to delete or edit the key. Editing keys in the Curve Editor is the same as [editing keys in the Curves view](crv_keys_edit.md). Note that you cannot delete the first and last keys.
|
||||
* Select a shape template from the bottom of the Curve Editor.
|
||||
|
||||
The Curve Editor also includes shape templates based on whether you are modifying the Blend In curve or the Blend Out curve. Select a shape template to change the blend curve to the selected shape template.
|
@ -0,0 +1,23 @@
|
||||
# Duplicating clips
|
||||
|
||||
There are many ways to duplicate clips in the Clips view:
|
||||
|
||||
* Select a clip or multiple clips. Right-click in the Clips view and select **Duplicate** from the context menu.
|
||||
* Select a clip or multiple clips. Hold Command/Control and press D.
|
||||
* Right-click an unselected clip and choose **Duplicate** from the context menu.
|
||||
|
||||
Duplicating clips copies each selected clip and places the duplicates after the last clip on the same track. If you duplicate clips used in a blend or clips separated by a gap, the blend or gap is also duplicated.
|
||||
|
||||
If you duplicate an Animation clip that uses a recorded clip as its Source Asset, the recorded clip is also duplicated. The duplicate of the recorded clip only appears in your Project after you save the Scene or Project. For example, the following images demonstrates what happens if you duplicate an Animation clip named "Clip 2B" that uses the recorded clip named "Recorded (3)".
|
||||
|
||||

|
||||
|
||||
_Select the"Clip 2B", hold Command/Control and press D to duplicate_
|
||||
|
||||

|
||||
|
||||
_A duplicate Animation clip is placed at the end of the same track. The recorded clip associated with "Clip 2B" is also duplicated._
|
||||
|
||||

|
||||
|
||||
_The new "Recorded (6)" recorded clip appears in the Project window after you save the Scene or Project_
|
@ -0,0 +1,73 @@
|
||||
# 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, select a clip and, in the Inspector window, set either the **Ease In Duration** or the **Ease Out Duration**.
|
||||
|
||||

|
||||
|
||||
_Use Ease In Duration and Ease Out Duration to smoothly transition into and out of the selected clip._
|
||||
|
||||
Ease-in and ease-out transitions create different effects, depending on the track:
|
||||
|
||||
* On an Animation track or an Animation Override track, ease-in to an Animation clip to create a smooth transition between the animation in the gap before the clip and the Animation clip. Ease-out of an Animation clip to create a smooth transition between the Animation clip and the animation in the gap after the clip. For information on the factors that determine what animation occurs in the gap before and after an Animation clip, see [Setting gap extrapolation](clp_gap_extrap.md).
|
||||
|
||||
* On an Audio track, ease-in to an Audio clip to fade in the volume of the audio waveform. Ease-out of an Audio clip to fade out the volume of the audio waveform specified by the Audio clip.
|
||||
|
||||
* On a Playable track, ease-In to a Playable clip to fade in the effect or script in the Playable clip. Ease-out of a Playable clip to fade out the effect or script in the Playable clip.
|
||||
|
||||

|
||||
|
||||
_Ease-in and ease-out an Animation clip to transition between its animation and its gaps. Timeline represents ease-in and ease-out transitions as a linear curve._
|
||||
|
||||
Although the Clips view represents an ease-in or ease-out transition 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_
|
||||
|
||||
Note that the **Blend Curves** might affect the blend area used for blending between two clips. The **Ease In Duration** and **Ease Out Duration** properties indicate whether the **Blend Curves** affect an ease-in or ease-out transition, or a blend. For example, If the **Ease Out Duration** is editable, then the Blend Out curve (labelled **Out**) affects the curve used by an ease-out transition. If the **Ease Out Duration** is not editable, then the Blend Out curve (labelled **Out**) affects the outgoing clip in a blend between two clips.
|
||||
|
||||

|
||||
|
||||
_Ease Out Duration is not editable, 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 curve preview to open the Curve Editor below the Inspector window.
|
||||
|
||||

|
||||
|
||||
_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](clp_blend.md).
|
||||
|
||||
When creating an ease-in or an ease-out transition 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](clp_gap_extrap.md) 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 GameObject.
|
||||
* The position or animation of the GameObject in the Scene, outside the Timeline Asset.
|
||||
|
||||
## Gap extrapolation and easing clips
|
||||
|
||||
To successfully ease-in or ease-out an Animation clip, gap extrapolation must not be set based on the Animation clip being eased-in or eased-out. Gap extrapolation must either be set to **None** or set by another Animation clip.
|
||||
|
||||
For example, the following ease-in transition 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 transition 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)._
|
||||
|
||||
## Overriding Animation tracks with ease-in and ease-out transitions
|
||||
|
||||
Use two Animation tracks bound to the same GameObject to create a smooth transition between two Animation clips.
|
||||
|
||||
For example, if two Animation tracks are bound to the same GameObject and a clip on the second track contains an ease-in transition, the ease-in transition creates a smooth transition between the animation on the previous track and the animation on the second track.
|
||||
|
||||

|
||||
|
||||
_Example of using two Animation tracks, bound to the same GameObject, to create smooth transitions between Animation clips._
|
||||
|
||||
In this example, 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 eases-out to return back to the idle cycle
|
||||
|
||||
To successfully override animation on a previous track, the gap extrapolation for the second track must be set to **None** so that the animation data in the gap is taken from the previous track bound to the same GameObject. The ease-in and ease-out transitions use this animation data.
|
@ -0,0 +1,46 @@
|
||||
# Setting gap extrapolation
|
||||
|
||||
Gap extrapolation refers to how an Animation track approximates animation data in the gaps before and after an Animation clip.
|
||||
|
||||
The main purpose for extrapolating animation data in the gaps between Animation clips is to avoid animation anomalies. Depending on the GameObject bound to the Animation track, these anomalies could be a GameObject jumping between two transformations, or a humanoid jumping between different poses.
|
||||
|
||||
Each Animation clip has two gap extrapolation properties: **Pre-Extrapolate**, which controls how animation data is approximated in the gap before an Animation clip, and **Post-Extrapolate**, which controls how animation data extends in the gap after an Animation clip.
|
||||
|
||||
By default, Timeline sets both extrapolation properties to **Hold**. This sets the gap before the Animation clip to the animation on the first frame, and the gap after the Animation clip to the animation on the last frame. Each gap "holds" the animation at a certain frame. Icons before and after an Animation clip indicate the selected extrapolation modes.
|
||||
|
||||

|
||||
|
||||
_Icons indicate the pre-extrapolate and post-extrapolate modes_
|
||||
|
||||
When an Animation track contains a gap between two Animation clips, the **Post-Extrapolate** property of the left clip sets the gap extrapolation. If the **Post-Extrapolate** property of the clip to the left of a gap is set to **None**, the **Pre-Extrapolate** property of the right clip sets the gap extrapolation. Icons before and after Animation clips indicate whether the extrapolation for a gap is taken from the **Post-Extrapolate** property of the clip to the left or from the **Pre-Extrapolate** property of the clip to the right.
|
||||
|
||||

|
||||
|
||||
_First track (red box): gap extrapolation from Post-Extrapolate of the left clip. Third track (blue box): gap extrapolation from Pre-Extrapolate of the right clip._
|
||||
|
||||
To change the Pre-Extrapolate and Post-Extrapolate properties, select the Animation clip and use the Animation Extrapolation properties in the Inspector window.
|
||||
|
||||

|
||||
|
||||
_Use Pre-Extrapolate and Post-Extrapolate to set the extrapolation modes for the selected Animation clip_
|
||||
|
||||
The Pre-Extrapolate property is hidden when one of the following is true:
|
||||
|
||||
* The gap before the Animation clip is set by the Post-Extrapolation mode of the previous clip.
|
||||
* There is no gap before the Animation clip.
|
||||
|
||||
Use the Pre-Extrapolation property to set the gap extrapolation of the gap before the selected Animation clip to one of the following options:
|
||||
|
||||
* **None**: Turns off pre-extrapolation. In the gap before the selected Animation clip, the GameObject uses its transform, pose, or state from the Scene. Select **None** if, for example, you want to create an ease-in between the motion of a GameObject in the Scene and an Animation clip. See [Easing-in and Easing-out Clips](clp_ease.md) for details.
|
||||
* **Hold** (default): In the gap before the selected Animation clip, the GameObject bound to the Animation track uses the values assigned at the start of the Animation clip.
|
||||
* **Loop**: In the gap before the selected Animation clip, the GameObject bound to the Animation track repeats the entire animation as a forward loop: from start to end. To offset the start of the loop, use the **Clip In** property.
|
||||
* **Ping Pong**: In the gap before the selected Animation clip, the GameObject bound to the Animation track repeats the entire animation forwards, then backwards. Use the **Clip In** property to offset the start of the loop. Changing the **Clip In** property affects the start of the loop when looping forward, and the end of the loop when looping backwards.
|
||||
* **Continue**: In the gap before the selected Animation clip, the GameObject bound to the Animation track either holds or loops the animation based on the settings of the Source Asset. For example, if the selected Animation clip uses the motion file "Recorded(2)" as its Source Asset and "Recorded(2)" is set to **Loop**, then selecting **Continue** loops the animation according to the "Recorded(2)" Loop Time settings.
|
||||
|
||||
Use the Post-Extrapolate property to set the gap extrapolation of the gap after the selected Animation clip to one of the following options:
|
||||
|
||||
* **None**: Turns off post-extrapolation. In the gap after the selected Animation clip, the GameObject uses its transform, pose, or state from the Scene. Selecting **None** is useful if, for example, you want to create an ease-out between an Animation clip and the motion of a GameObject in the Scene. See [Easing-in and Easing-out Clips](clp_ease.md) for details.
|
||||
* **Hold** (default): In the gap after the selected Animation clip, the GameObject bound to the Animation track uses the values assigned at the end of the Animation clip.
|
||||
* **Loop**: In the gap after the selected Animation clip, the GameObject bound to the Animation track repeats the entire animation as a forward loop: from start to end. To offset the start of the loop, use the **Clip In** property.
|
||||
* **Ping Pong**: In the gap after the selected Animation clip, the GameObject bound to the Animation track repeats the entire animation forwards, then backwards. Use the **Clip In** property to offset the start of the loop. Changing the **Clip In** property affects the start of the loop when looping forward, and the end of the loop when looping backwards.
|
||||
* **Continue**: In the gap after the selected Animation clip, the GameObject bound to the Animation track either holds or loops the animation based on the settings of the Source Asset. For example, if the selected Animation clip uses the motion file "Recorded(2)" as its Source Asset and "Recorded(2)" is set to **Loop**, then selecting **Continue** loops the animation according to the "Recorded(2)" Loop Time settings.
|
@ -0,0 +1,24 @@
|
||||
# Inserting clips
|
||||
|
||||
The Timeline window supports different methods of inserting clips depending on the type of track, where you click, and whether a clip or track is already selected. In the Timeline window, inserting clips refers to adding and making space for a clip without blending or replacing intersecting clips.
|
||||
|
||||
To accurately insert a clip, select Ripple mode as the Clip Edit mode, and position the Timeline Playhead to set the insertion point. Select **Add From Animation Clip** from the Track menu for the track where you want to insert the clip.
|
||||
|
||||

|
||||
|
||||
_Accurately insert a clip with the Ripple mode (red circle), the Timeline Playhead (green box), and the Add From Animation Clip in the Track menu_
|
||||
|
||||
In the above example, the Timeline Playhead is the insertion point. You can specify the insertion point using these other methods:
|
||||
|
||||
* Right-click within a gap and add a clip with the context menu. The insertion point is where you right-click.
|
||||
* Drag a Source Asset (animation or audio) to a track in the Clips view. The insertion point is where you stop dragging.
|
||||
|
||||
The location of the insertion point determines where the clip is inserted and how it affects the other clips and gaps on the same track:
|
||||
|
||||
* If the insertion point intersects a clip, the inserted clip is added at the insertion point. The intersected clip, and all subsequent clips and gaps, are rippled after the inserted clip.
|
||||
* If the insertion point is within a gap and there is enough space between the insertion point and the next clip, then the inserted clip is added to the gap. The other clips on the track are not affected.
|
||||
* If the insertion point is within a gap and the inserted clip overlaps the next clip, the inserted clips is added at the insertion point. The next clip, and all subsequent clips and gaps, are rippled to accommodate the inserted clip.
|
||||
|
||||

|
||||
|
||||
_For example, inserting a clip at the Timeline Playhead ripples Clip 1B to accommodate the 36 frame Run clip._
|
@ -0,0 +1,41 @@
|
||||
# Matching clip offsets
|
||||
|
||||
Every Animation clip contains key animation, or motion, that animates the GameObject, or humanoid, bound to the Animation track.
|
||||
|
||||
When you add an Animation clip to an Animation track, its key animation or motion does not automatically begin where the previous clip ends. The key animation or motion also does not end where the next clip begins. By default, each Animation clip begins at the position and rotation of the GameObject, or humanoid, at the beginning of the Timeline instance.
|
||||
|
||||

|
||||
|
||||
_An animation sequence of three Animation clips._
|
||||
|
||||
For example, three Animation clips create an animation sequence that starts with a clip of a standing humanoid that starts to run, then turns left, and finally comes to a stand still.
|
||||
|
||||
Each Animation clip begins at the position and rotation of the humanoid at the start of the Timeline instance, indicated by a red arrow in the Scene view below. The three Animation clips, Stand2Run, RunLeft, and Run2Stand, end at the green, blue, and yellow arrows, respectively.
|
||||
|
||||

|
||||
|
||||
For an animation sequence to flow seamlessly between adjacent Animation clips, you must match each Animation clip with its previous clip or next clip. Matching clips adds a position and rotation offset for each Animation clip. The position and rotation offsets are named **Clip Transform Offsets** and they [can be set manually](insp_clp_anim_plyb.md) or automatically. The following sections describe how to automatically match two or many Animation clips.
|
||||
|
||||
## Matching two clips
|
||||
|
||||
To match the clip offsets between two clips, right-click the Animation clip that you want to match. From the context menu, select either **Match Offsets to Previous Clip** or **Match Offsets to Next Clip**.
|
||||
|
||||

|
||||
|
||||
_Matching an Animation clip with the next clip_
|
||||
|
||||
For example, right-click the middle Animation clip, named "RunLeft", and select **Match Offsets To Next Clip** to match its offsets to the next clip
|
||||
|
||||
When you are matching offsets for a single Animation clip, you don’t need to select the Animation clip first, but you must right-click the Animation clip that you want to match. For example, if you right-click an Animation clip that is not selected, Timeline matches the clicked clip and ignores the selected Animation clips.
|
||||
|
||||
The context menu only displays the match options available for the clicked Animation clip. For example, if there is a gap **before** the clicked Animation clip, only the **Match Offsets to Next Clip** menu item is available.
|
||||
|
||||
## Matching many clips
|
||||
|
||||
To match the clip offsets of many clips, select the adjacent Animation clips that you want to match and right-click one of the selected clips. From the context menu, select either **Match Offsets to Previous Clip** or **Match Offsets to Next Clip**.
|
||||
|
||||

|
||||
|
||||
_Matching many clips with previous clips_
|
||||
|
||||
For example, select the "RunLeft" and "Run2Stand" clips. Right-click one of the selected clips, and select **Match Offsets to Previous Clips**, to match the "RunLeft" clip with the previous "Stand2Run" clip, and to match "Run2Stand" with the previous "RunLeft" clip.
|
@ -0,0 +1,23 @@
|
||||
# Panning and zooming the Clips view
|
||||
|
||||
Use either the keyboard or the zoombar to pan and zoom the contents of the Clips view. There are many ways to pan, zoom, or frame clips in the Clips view with the keyboard:
|
||||
|
||||
* To pan, either middle-drag, or hold Alt and drag.
|
||||
* To frame all selected clips, [select clips](clp_select.md) then press F.
|
||||
* To frame all clips, press A.
|
||||
* To zoom horizontally, move the scroll-wheel.
|
||||
* To zoom vertically, hold Command/Control and move the scroll-wheel.
|
||||
|
||||
When you horizontally zoom the Clips view, the zoombar indicates the level of zoom. The zoombar is the horizontal bar at the bottom of the Clips view that zooms and pans the section of the Timeline instance or Timeline Asset that is shown in the Clips view.
|
||||
|
||||

|
||||
|
||||
_The zoombar (inside the red box) and the zoombar handles (shown by the green arrows). The zoombar thumb is the area between the two zoombar handles._
|
||||
|
||||
There are many ways to pan and zoom with the zoombar:
|
||||
|
||||
* To pan, drag the zoombar thumb left or right.
|
||||
* To jump to a section of the Timeline instance or Timeline Asset, click on an empty area of the scrollbar, on either side of the zoombar.
|
||||
* To zoom in or zoom out, drag either zoombar handle. Dragging a zoombar handle also resizes the zoombar thumb.
|
||||
|
||||
On the zoombar thumb, a white line indicates the location of the Timeline Playhead. Use this line to see where the Timeline Playhead is in relation to the zoom level and the part of the Timeline instance shown in the Clips view.
|
@ -0,0 +1,57 @@
|
||||
# Positioning clips
|
||||
|
||||
To position a clip, select Mix mode as the Clip Edit mode. Select a clip and hover over the middle of the clip. When the cursor changes to a position cursor, click and drag the clip to its new position.
|
||||
|
||||
While dragging, black lines indicate the selection of clips being positioned. The Timeline ruler shows the start time and end time of the selected clips being positioned.
|
||||
|
||||

|
||||
|
||||
_Select Mix mode (circled). Select and drag to position a clip._
|
||||
|
||||
By default, when you drag to position clips, both Snap to Frame and Edge Snap are enabled in the Clips view. You can change these snap settings in the [Timeline Settings](tl_settings.md) menu.
|
||||
|
||||
You can also move a clip to another track of the same type. Drag the clip off of its current track and a white ghost indicates where the clip will be moved. If you drag a clip to an area where the clip cannot be placed, the ghost changes to red indicating that you cannot release the clip in that area. For example, you cannot drag a clip where there is no track.
|
||||
|
||||

|
||||
|
||||
_The ghost of the selection being moved is drawn in red if you attempt to move a clip to an invalid area_
|
||||
|
||||
You can position a selection of clips on the same track, or on different tracks. You are not limited to positioning one clip at a time. The same edge snapping rules and invalid area restrictions apply when positioning a selection of clips on many tracks.
|
||||
|
||||
## Positioning clips with the Inspector window
|
||||
|
||||
You can use the [Inspector window to position clips](insp_clp.md). To position a clip with the Inspector window, select a clip and use the Clip Timing properties in the Inspector window to change its **Start** property.
|
||||
|
||||

|
||||
|
||||
_Clip Timing properties for an Animation clip_
|
||||
|
||||
The effect that changing the Start value has on adjacent clips depends on the selected Clip Edit mode.
|
||||
|
||||
## Positioning clips in different Clip Edit modes
|
||||
|
||||
You are not restricted to positioning clips with Mix mode as the selected Clip Edit mode. You can also position clips in Ripple mode and in Replace mode. The difference is the effect each Clip Edit mode has on adjacent clips on the tracks where clips are being moved:
|
||||
|
||||
* Positioning clips in Mix mode creates blends between intersecting clips.
|
||||
* Positioning clips in Ripple mode ripples subsequent clips, respecting the gaps between clips.
|
||||
* Positioning clips in Replace mode cuts or replaces intersecting clips.
|
||||
|
||||
## Positioning clips with the Timeline Playhead
|
||||
|
||||
You can position clips by inserting frames at the position of the Timeline Playhead. To do this, move the Timeline Playhead to where you want to insert frames.
|
||||
|
||||

|
||||
|
||||
_To insert frames starting at frame 40, move the Timeline Playhead to frame 40_
|
||||
|
||||
Right-click the Timeline Playhead on the Timeline ruler above the Clips view, choose **Insert** > **Frame**, and a number of frames.
|
||||
|
||||

|
||||
|
||||
_To insert 25 frames, right-click the Timeline Playhead and select **Insert** > **Frame**, then 25 Frames_
|
||||
|
||||
This inserts frames in the Timeline Asset at the position of the Timeline Playhead. Inserting frames only repositions the clips that start **after** the position of the Timeline Playhead.
|
||||
|
||||

|
||||
|
||||
_Only the clips that start after the Timeline Playhead are moved. In this example, inserting 25 frames at frame 40 affects Clip 1B, Clip 2B, and Clip 2C._
|
@ -0,0 +1,18 @@
|
||||
# Resetting clips
|
||||
|
||||
You can reset the duration and speed of a clip. Resetting a clip **does not reset** the following properties:
|
||||
|
||||
* Start
|
||||
* Ease In Duration and Ease Out Duration
|
||||
* Animation Extrapolation settings
|
||||
* Blend Curves
|
||||
|
||||
To reset a clip, right-click the clip and select **Editing** from the context menu. Then, select **Reset Duration**, **Reset Speed**, or **Reset All**. Depending on the reset option you select, resetting a clip does the following:
|
||||
|
||||
|**Option:** |**Description:** |
|
||||
|:---|:---|
|
||||
|**Reset Duration**|Resets the Duration and the Clip In.|
|
||||
|**Reset Speed**|Resets the Speed Multiplier.|
|
||||
|**Reset All**|Resets the Duration, Clip In, and Speed Multiplier.|
|
||||
|
||||
If resetting a clip results in two clips overlapping each other, Timeline creates a blend for the overlap, regardless of the selected Clip Edit mode.
|
@ -0,0 +1,41 @@
|
||||
# Selecting clips
|
||||
|
||||
Click to select a single clip. The Clips view displays the selected clip with a white border, including its blends. Selecting a clip deselects all other tracks or clips.
|
||||
|
||||
Selecting a clip also shows its properties in the Inspector window. The clip properties change depending on the type of clip and whether multiple clips are selected. See [Setting Clip properties](insp_clp.md) for details.
|
||||
|
||||
Hold Shift and click to select contiguous clips vertically on different tracks or horizontally on the same track. For example, to select three contiguous clips on the same track, select the first clip, then hold Shift and click the third clip. All three clips are selected.
|
||||
|
||||

|
||||
|
||||
_Click to select the first clip_
|
||||
|
||||

|
||||
|
||||
_Shift-click the third clip to select contiguous clips on the same track_
|
||||
|
||||
Hold Command/Control and click to select discontiguous clips. Hold Command/Control and click a selected clip to deselect it.
|
||||
|
||||
Click and drag on an empty area in the Clips view to draw a selection rectangle. This selects all clips inside the rectangle, including the clips that intersect the rectangle. Hold down Shift and draw a selection rectangle to add clips to the current selection.
|
||||
|
||||
You can also press the Tab key to select clips. The behaviour of the Tab key changes depending on the current selection:
|
||||
|
||||
* If a track is selected, press Tab to select the first clip on the selected track.
|
||||
* If many tracks are selected, press Tab to select the first clip on the first selected track.
|
||||
* If a clip is selected, press Tab to [select its track](trk_select.md).
|
||||
* If there are no clips or tracks selected, press Tab to select the first clip on the first track.
|
||||
|
||||
Use the arrow keys to change the selected clips. The behaviour and results depend on the current selection and which modifier keys you press:
|
||||
|
||||
* If nothing is selected in the Timeline window, press the Tab, Up arrow, or Down arrow key to select the first clip on the first track.
|
||||
* If a clip is selected, press the Left arrow key to select the previous clip. If the selected clip is the first clip on a track, the Left arrow key selects the track.
|
||||
* If a clip is selected, press the Right arrow key to select the next clip. Press the Up arrow key to select the closest clip on a previous track. Press the Down arrow key to select the closest clip on a next track.
|
||||
* Hold Shift and press either the Left arrow key or Right arrow key to add or remove clips from the selection of clips. Whether a clip is added to or removed from the selection of clips is relative to the first selected clip.
|
||||
|
||||
If you zoom into the Clips view, it pans to show either the start or end of the most recently selected clip. For example, if a selected clip is framed in the Clips view and you press the Right arrow key to select the next clip which is outside the Clips view, the Clips view pans to show the start of the selected clip.
|
||||
|
||||
You can also select clips with the Timeline Playhead. Right-click the Timeline Playhead and choose a selection option. This selects clips that either start after, start before, end after, end before, or intersect the Timeline Playhead. Clips are selected on all tracks.
|
||||
|
||||

|
||||
|
||||
_Right-click the Timeline Playhead and choose **Select** for more clip selection options_
|
@ -0,0 +1,28 @@
|
||||
# Changing clip play speed
|
||||
|
||||
Change the clip play speed to accelerate or decelerate its audio, motion, animation, or particle effect. Changing the clip play speed affects the duration of the clip. You can only change the play speed for Animation clips, Audio clips, and Control clips.
|
||||
|
||||
To change the clip play speed, first, select the Clip Edit mode to determine how other clips on the same track are affected:
|
||||
|
||||
* If the change in duration results in two clips that overlap each other:
|
||||
* Select Mix mode to create a blend.
|
||||
* Select Replace mode to cut or remove intersecting clips.
|
||||
* Select Ripple mode to reposition the clips that come after the clip being sped up or slowed down. Ripple mode preserves the gaps between clips.
|
||||
|
||||
Select the clip and set the **Speed Multiplier** property in the Inspector window. The **Speed Multiplier** property shows the play speed as a multiplier of the original clip speed, so 1 plays the clip at the same speed as the original clip.
|
||||
|
||||

|
||||
|
||||
_Speed Multiplier in the Inspector window_
|
||||
|
||||
For example, to double the play speed of an Animation clip, change the **Speed Multiplier** to 2. This changes the duration of an 80 frame Animation clip to 40 frames by doubling its play speed.
|
||||
|
||||
There are other ways to change the play speed of a clip:
|
||||
|
||||
* Right-click the clip and select **Editing > Double Speed** to halve the clip duration. The clip plays at twice its current speed. A short-dashed line and a multiplication factor indicates an accelerated clip. Doubling the clip speed sets the **Speed Multiplier** property to double its current value.
|
||||
* Right-click the clip and select **Editing > Half Speed** to double the clip duration. The clip plays at half its current speed. A long-dashed line and multiplication factor indicates a decelerated clip. Halving the clip speed sets the **Speed Multiplier** property to half its current value.
|
||||
* Right-click the clip and select **Editing > Reset Speed** to reset the clip to its original speed. This is the original duration of the clip. Resetting the clip speed sets the **Speed Multiplier** property to 1.
|
||||
|
||||

|
||||
|
||||
_A short-dashed line and multiplication factor of 2.00x indicates a clip playing at double its original speed_
|
@ -0,0 +1,15 @@
|
||||
# Splitting clips
|
||||
|
||||
You can split a clip into two identical clips that have different start points, end points, and durations. You can extend the start or end of the clip to include split animation or audio. You can also [reset a clip](clp_reset.md) to undo a split and other edits.
|
||||
|
||||
To split a clip, select the clip, position the playhead where you want to split the clip, and either right-click the clip and select **Editing** > **Split**, or press S. Any selected clips that intersect the playhead are split into separate clips. You can position, trim, and edit split clips independently.
|
||||
|
||||

|
||||
|
||||
_Select the clips to be split, position the playhead where you want the split to occur, and press S_
|
||||
|
||||

|
||||
|
||||
_Selected clips are split where each clip intersects the playhead_
|
||||
|
||||
If a split clip is part of a blend, or if the split is performed within a blend, Timeline copies the blend settings to the split clips.
|
@ -0,0 +1,15 @@
|
||||
# Tiling clips
|
||||
|
||||
Tile clips to remove gaps and blends between clips on the same track. Tiling clips is useful if you want each clip to begin exactly where the previous clip ends. If you select multiple clips on multiple tracks, you must select at least two clips on the same track for tiling to have an affect.
|
||||
|
||||
To tile clips, select at least two clips on the same track.
|
||||
|
||||

|
||||
|
||||
_Three clips with gaps and blends are selected_
|
||||
|
||||
Right-click on one of the selected clips and select Tile from the context menu. Timeline positions the selected clips based on the position of the first selected clip. The first selected clip does not move, and the duration of each clip remains the same.
|
||||
|
||||

|
||||
|
||||
_Tiling removes gaps and blends between the selected clips_
|
@ -0,0 +1,75 @@
|
||||
# Trimming clips
|
||||
|
||||
Trimming a clip cuts off a portion of the clip at its start or end. To trim a clip, select the Mix mode as the Clip Edit mode, then drag the start or end of the clip. Dragging the start or end of a clip automatically selects the clip, showing its properties in the Inspector window. Use the [Clip Timing properties](insp_clp.md) in the Inspector window to set the start, end, duration, and offset (Clip In) of a clip to exact values.
|
||||
|
||||

|
||||
|
||||
_Position and trim a clip by adjusting its Start, End, Duration, and Clip In properties in the Inspector window_
|
||||
|
||||
## Trimming the start of a clip
|
||||
|
||||
Trimming an Animation clip or Audio clip after the start of the Source Asset, selects the part of the Source Asset the clip uses.
|
||||
|
||||

|
||||
|
||||
_Trimming the start of an Animation clip trims its key animation, relative to the start of the Source Asset_
|
||||
|
||||
Trimming a clip is non-destructive. Trim the clip again to modify its start to include the animation, or the audio waveform, cut off during a previous trim. You can also [reset a clip](clp_reset.md) to undo trims or other edits.
|
||||
|
||||
To trim the start of a clip to a precise time or frame, use the **Clip In** property in the Inspector window.
|
||||
|
||||
Changing the **Clip In** property is similar to the same effect as trimming the start of a clip after the start of its Source Asset.
|
||||
|
||||
## Trimming the end of a clip
|
||||
|
||||
As with the start of the clip, trimming an Animation clip or Audio clip before the end of the Source Asset, selects the part of the Source Asset the clip uses.
|
||||
|
||||

|
||||
|
||||
_Trimming the end of an Animation clip trims its key animation, relative to the end of the Source Asset_
|
||||
|
||||
If you trim the end of an Animation clip or Audio clip past the end of the Source Asset the clip is based on, the extra clip area either holds or loops, depending on the settings of the Source Asset.
|
||||
|
||||
For example, an Animation clip named "End Move" uses the motion file "Recorded(2)" as its Source Asset. The motion file "Recorded(2)" is set to loop. Trimming the end of the Animation clip past the end of the "Recorded(2)" Source Asset fills the extra clip area by looping "Recorded(2)". A white animation curve shows the hold or loop.
|
||||
|
||||

|
||||
|
||||
_A white animation curve indicates whether the extra clip area holds or loops data, depending on the Source Asset_
|
||||
|
||||
To choose whether the extra clip area holds or loops, select the Source Asset to change its settings in the Inspector window. Depending on the type of Source Asset, different properties control whether the Source Asset holds or loops.
|
||||
|
||||
If you are unsure which Source Asset is used by a clip, select the clip in the Clips view, right-click and select **Find Source Asset** from the context menu. This highlights the Source Asset in the Project window.
|
||||
|
||||
## Trimming the end of looping clips
|
||||
|
||||
The Timeline window provides special trimming options for Animation clips or Audio clips with loops. These special trim options either remove the last partial loop or complete the last partial loop.
|
||||
|
||||
For example, the Animation clip named run_away is over three times longer than the Source Asset on which it is based. Since the Source Asset is set to loop, the Animation clip loops the Source Asset until the Animation clip ends which results in a partial loop.
|
||||
|
||||

|
||||
|
||||
_L1, L2, and L3 signify complete loops. The clip ends partially through the fourth loop, L4._
|
||||
|
||||
To extend the end of the clip and complete a partial loop, select the clip, right-click and select **Editing** > **Complete Last Loop**. To trim the clip at the last complete loop, select the clip, Right-clip and select **Editing** > **Trim Last Loop**.
|
||||
|
||||

|
||||
|
||||
_The result of select **Editing** > **Complete Last Loop**_
|
||||
|
||||

|
||||
|
||||
_The result of select **Editing** > **Trim Last Loop**_
|
||||
|
||||
## Trimming with the Timeline Playhead
|
||||
|
||||
You can also trim a clip based on the location of the playhead. To trim using the playhead, position the playhead within the clip to be trimmed. Right-click the clip and select either **Editing** > **Trim Start** or **Editing** > **Trim End**. **Trim Start** trims the start of the clip to the playhead. **Trim End** trims the end of the clip to the playhead.
|
||||
|
||||

|
||||
|
||||
_Move the Timeline Playhead within the _
|
||||
|
||||

|
||||
|
||||
_Right-click and select **Editing** > **Trim Start** to trim the start of the clip to the playhead_
|
||||
|
||||
If you select clips on multiple tracks, Timeline only trims the selected clips that intersect the playhead.
|
@ -0,0 +1,17 @@
|
||||
# Curves view
|
||||
|
||||
The Curves view shows the animation curves for Infinite clips, or for Animation clips that were converted from Infinite clips. Use the Curves view for basic animation editing such as adding keys, modifying keys, adjusting tangents, and changing the interpolation between keys.
|
||||
|
||||
To view animation curves for an Infinite clip, click the Curves icon next to the Track name. To view animation curves for an Animation clip, select the Animation clip and click the Curves icon. The Curves view is similar to [Curves mode](https://docs.unity3d.com/Manual/animeditor-AnimationCurves.html) in the Animation window.
|
||||
|
||||

|
||||
|
||||
_The Curves icon (circled) shows and hides the Curves view for the selected clip_
|
||||
|
||||
The Curves icon does not appear for Animation tracks with humanoid animation or imported animation. To view and edit key animation for humanoid or imported Animation clips, right-click an Animation clip and select **Edit in Animation Window** from the context menu. You can also double-click the Animation clip. The Animation window appears, linked to the Timeline window.
|
||||
|
||||
When in linked mode, the Animation window shows a Linked icon and the name of the Animation clip being edited. Click the Linked icon to stop editing the Animation clip and to release the Animation window from linked mode.
|
||||
|
||||

|
||||
|
||||
_Animation window linked to the Timeline window, indicated by the Linked icon and Animation clip name_
|
@ -0,0 +1,15 @@
|
||||
# Hiding and showing curves
|
||||
|
||||
For the selected Animation clip, the Curves view includes a hierarchical list of the properties with animation curves. Expand, collapse, select, and deselect the properties in this list to filter which animation curves show in the Curves view.
|
||||
|
||||
For example, to show only the X-axis animation curves for the position of a GameObject, expand **Position**, select the **Position.x** property, and then press F to frame the animation curve for the **Position.x** property.
|
||||
|
||||

|
||||
|
||||
_Curves view showing the animation curve for the Position.x property_
|
||||
|
||||
There are many ways to expand, collapse, select, and deselect animation curves:
|
||||
|
||||
* Click the Triangle icon of a parent property to expand and collapse its list of child properties.
|
||||
* Hold Shift and click to select contiguous properties.
|
||||
* Hold Command/Control and click to select discontiguous properties. Hold Command/Control and click a selected property to deselect it.
|
@ -0,0 +1,6 @@
|
||||
# Adding keys
|
||||
|
||||
The Curves view provides the following methods for adding keys:
|
||||
|
||||
* Right-click on an animation curve and select **Add Key**. This method adds a key at the location of the right-click.
|
||||
* Double-click on an animation curve. This method adds a key at the location of the Double-click.
|
@ -0,0 +1,6 @@
|
||||
# Deleting keys
|
||||
|
||||
The Curves view provides the following methods for deleting keys:
|
||||
|
||||
* Right-click a key and select **Delete Key** from the context menu. This method does not affect selected keys.
|
||||
* Select a key and either press Delete or right-click and select **Delete Key** from the context menu.
|
@ -0,0 +1,9 @@
|
||||
# Editing keys
|
||||
|
||||
Edit a key to change its time, value, or both. The Curves view provides the following different methods for editing a key:
|
||||
|
||||
* Right-click a key and select **Edit** from the context menu to enter specific values for time and value.
|
||||
* Select a key and press Enter to enter specific values.
|
||||
* Select and drag a key to change its time and value.
|
||||
* Drag a key vertically, then press Shift to snap the key on the vertical axis. This changes the value of the key, but not its time.
|
||||
* Drag a key horizontally, then press Shift to snap the key on the horizontal axis. This changes the time of the key, but not its value.
|
@ -0,0 +1,27 @@
|
||||
# Changing interpolation and shape
|
||||
|
||||
Every key has one or two tangents that control the interpolation of the animation curve. The term **interpolation** refers to the estimation of values that determine the shape of the animation curve between two keys.
|
||||
|
||||
Whether a key has one of two tangents depends on the location of the key on the animation curve. The first key only has a right tangent that controls the interpolation of the animation curve after the key. The last key only has a left tangent that controls the interpolation of the animation curve before the last key.
|
||||
|
||||

|
||||
|
||||
_The first key (red) only has a right tangent, and the last key (blue) only has a left tangent_
|
||||
|
||||
All other keys have two tangents where the left tangent controls the interpolation before the key, and the right tangent controls the interpolation after the key. By default, tangents are joined. Dragging one tangent affects the position of both tangents, and the interpolation of the animation curve both before and after the key.
|
||||
|
||||

|
||||
|
||||
_Keys that are neither the first key nor last key have joined tangents by default. Dragging either tangent changes the interpolation of the animation curve both before and after the key._
|
||||
|
||||
Dragging a tangent may also change the interpolation mode of the animation curve. For example, most keys are set to the **Clamped Auto** interpolation mode which automatically smooths animation curve as it passes through the key. If you drag a tangent of a key set to **Clamped Auto**, the interpolation mode changes to **Free Smooth**.
|
||||
|
||||
The term **interpolation mode** refers to the interpolation algorithm that determines which shape to use when drawing the animation curve.
|
||||
|
||||
To view the interpolation mode for a key, select the key and right-click. The context menu shows the interpolation mode. To change the interpolation mode for a key, select the key, right-click and select another interpolation mode.
|
||||
|
||||

|
||||
|
||||
_The context menu shows the interpolation mode for the selected key. Use the context menu to change the interpolation mode._
|
||||
|
||||
Some interpolation modes break the left and right tangents so that you can position them separately. When tangents are broken, you can set a separate interpolation mode for the animation curve before the key and the animation curve after the key. For more details on the different interpolation modes, see [Editing Curves](EditingCurves). In the [Animation window documentation](AnimationEditorGuide), the interpolation mode is referred to as **tangent type**.
|
@ -0,0 +1,19 @@
|
||||
# Selecting keys
|
||||
|
||||
Click to select a single key. Selecting a key deselects all other selected keys. The Curves view displays the selected key with its tangents.
|
||||
|
||||

|
||||
|
||||
_Click to select a single key. A selected key shows its tangents._
|
||||
|
||||
To select contiguous keys along the same animation curve, click the first key, then hold Shift and click the last key.
|
||||
|
||||

|
||||
|
||||
_Hold Shift and click a key to select contiguous keys_
|
||||
|
||||
There are many ways to select and deselect keys in the Curves view:
|
||||
|
||||
* Hold Command/Control and click to select discontiguous keys. Hold Command/Control and click a selected key to deselect it.
|
||||
* Click and drag on an empty spot in the Curves view to draw a selection rectangle. This selects all keys within the rectangle. Hold down Shift while drawing the selection rectangle to add keys to the current selection.
|
||||
* Double-click a selected key to select all keys on the same animation curve.
|
@ -0,0 +1,12 @@
|
||||
# Navigating the Curves view
|
||||
|
||||
Use one of the following methods to pan, zoom, resize, or frame the animation curves and keys in the Curves view:
|
||||
|
||||
* To pan, middle-drag, or hold Alt and drag.
|
||||
* To zoom vertically, move the scroll-wheel, or hold Alt and right-drag.
|
||||
* To zoom horizontally, hold Command/Control and zoom vertically.
|
||||
* To resize the Curves view, drag the double line separating the Curves view from the next track in the Track list.
|
||||
* To frame only selected animation curves or selected keys, press F.
|
||||
* To frame all animation curves or keys, press A.
|
||||
|
||||
You can also [use the Zoombar](clp_pan_zoom.md) to pan, zoom, and resize the Clips view.
|
@ -0,0 +1,16 @@
|
||||
apiRules:
|
||||
- exclude:
|
||||
uidRegex: ^EditorTests
|
||||
type: Namespace
|
||||
- exclude:
|
||||
uidRegex: ^Tests
|
||||
type: Namespace
|
||||
- exclude:
|
||||
uidRegex: ^Common
|
||||
type: Namespace
|
||||
- exclude:
|
||||
uidRegex: ^Timeline\.Tests
|
||||
type: Namespace
|
||||
- exclude:
|
||||
uidRegex: ^DocCodeExamples
|
||||
type: Namespace
|
@ -0,0 +1,9 @@
|
||||
# Collapsing and expanding Track groups
|
||||
|
||||
To collapse the tracks in a Track group, either click the Triangle icon beside the name of the Track group or double-click the Track group. The tracks are collapsed from view in the Timeline window, not muted. To expand the tracks in a Track group, click the Triangle icon or double-click the Track group again.
|
||||
|
||||

|
||||
|
||||
_Triangle icon (circled) collapses the tracks in the Game Board Track group. A ghost track visually represents the tracks in the collapsed group._
|
||||
|
||||
You can also press the Left Arrow key to collapse the tracks in a Track group while the Track group is selected. Press the Right Arrow key to expand the tracks in a Track group. If you press the Right Arrow key with a Track group already selected, the selection switches to the first track in the Track group.
|
@ -0,0 +1,15 @@
|
||||
# Locking Track groups
|
||||
|
||||
You can also lock a Track group to prevent editing its Track sub-groups, tracks, and clips. This is useful when you have finished animating the content within a Track group and you want to avoid inadvertently modifying its tracks or clips.
|
||||
|
||||
You cannot edit the tracks or select the clips in a locked Track group. The Lock icon identifies a locked Track group.
|
||||
|
||||

|
||||
|
||||
_Selected and locked Track group with Lock icon (red circle)_
|
||||
|
||||
To lock a Track group, right-click on the Track group header and select **Lock** from the context menu. You can also select a Track group and press L. You can select and lock multiple Track groups.
|
||||
|
||||
To unlock a Track group, click the Lock icon. You can also select a locked Track group and press L, or right-click and select **Unlock** from the context menu. Tracks in a Track group maintain their individual locked state when you lock a Track group. This means that if you lock a track and then lock its Track group, when you unlock the Track group, the track remains locked.
|
||||
|
||||
For example, the MovingPieces Track group has its first track locked and its second track unlocked. If you lock the Track group, both the first and second track are locked. If you unlock the Track group, the first track remains locked and the second track is unlocked because the first track was already locked before the Track group was locked.
|
@ -0,0 +1,27 @@
|
||||
# Using Track groups
|
||||
|
||||
Use Track groups to organize tracks when you are working with many tracks. For example, a Timeline Asset contains an Animation track and an Audio track that interacts with the same GameObject. To organize these tracks, move them into their own Track group.
|
||||
|
||||
To add a Track group, click the **Add** button and select **Track Group** from the **Add** menu. You can also right-click an empty area of the Track list and select **Track Group** from the context menu. A new Track group appears at the bottom of the Track list.
|
||||
|
||||

|
||||
|
||||
_Timeline window with Track group added_
|
||||
|
||||
To rename a Track group, click its name and an I-beam cursor appears. Type the new name for the Track group and press Return.
|
||||
|
||||
To move tracks into a Track group, select one or more tracks and drag over the Track group. The Track group is highlighted. When dragging a selection of tracks, the last selected track type displays beside the cursor. To drop the tracks before a specific track in the Track group, drag until a white insert line indicates the destination.
|
||||
|
||||

|
||||
|
||||
_Release the mouse button when the white insert line appears within the Track group_
|
||||
|
||||

|
||||
|
||||
_Selected tracks are moved to the location of the insert line_
|
||||
|
||||
A Track group can also have any number of Track sub-groups. To add a Track sub-group, either select a Track group and click the **Add** button in the Track list, or click the Plus icon beside the Track group name, and select **Track Sub-Group**. You can also use this menu to add tracks directly to a Track group or a Track sub-group.
|
||||
|
||||

|
||||
|
||||
_Click the Plus icon to add Track Sub-Groups and tracks to Track groups_
|
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 316 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 406 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 135 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 354 B |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 383 B |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 344 B |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 297 KiB |
After Width: | Height: | Size: 406 B |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 49 KiB |
@ -0,0 +1,44 @@
|
||||
# About Timeline
|
||||
|
||||

|
||||
|
||||
_Unity's Timeline_
|
||||
|
||||
Use Unity's Timeline to create cinematic content, game-play sequences, audio sequences, and complex particle effects.
|
||||
|
||||
Each cut-scene, cinematic, or game-play sequence that you create with Unity's Timeline consists of a Timeline Asset and a Timeline instance. The [Timeline window](tl_window.md) creates and modifies Timeline Assets and Timeline instances simultaneously.
|
||||
|
||||
The [Timeline Overview section](tl_about.md) includes details on the relationship between the Timeline window, Timeline Assets, and Timeline instances.
|
||||
|
||||
The [Using Timeline section](wf_about.md) shows how to create Timeline Assets and Timeline instances, record basic animation, animate humanoids, and use other Timeline features.
|
||||
|
||||
The [Samples section](smpl_about.md) includes a description of the samples offered by the Timeline package.
|
||||
|
||||
# Installing Timeline
|
||||
|
||||
Timeline is a Package and is installed through the Packages window in Unity. Consult the [Packages window documentation](https://docs.unity3d.com/Manual/upm-ui.html) for more information.
|
||||
|
||||
# Technical details
|
||||
|
||||
## Requirements
|
||||
|
||||
This version of Timeline is compatible with the following versions of the Unity Editor:
|
||||
|
||||
* 2019.1 and later (recommended)
|
||||
|
||||
## Package contents
|
||||
|
||||
The following table indicates the folder structure of the Timeline package:
|
||||
|
||||
|Location|Description|
|
||||
|---|---|
|
||||
|`<Runtime>`|Root folder containing the source for the Timeline Runtime. This is the source for what is available in the Player. |
|
||||
|`<Editor>`|Root folder containing the source for the Timeline Editor used to edit Timeline files inside the Unity Editor.|
|
||||
|
||||
## Document revision history
|
||||
|
||||
|Date|Reason|
|
||||
|---|---|
|
||||
|October 23, 2020|Added documentation for customization samples.|
|
||||
|October 22, 2020|Added samples section|
|
||||
|October 10, 2018|Document created. Matches package version 0.0.0|
|
@ -0,0 +1,26 @@
|
||||
# Timeline properties in the Inspector window
|
||||
|
||||
The Inspector window displays information about the selected GameObject including all attached components and their properties. This section documents the properties in the Inspector window that appear when you select one or many Timeline Assets, tracks, clips, or a combination.
|
||||
|
||||
If you select a single Timeline Asset, track, or clip, the Inspector window displays the properties for the selected Asset, track, or clip. For example, if you select an Animation clip, the Inspector window shows the [common properties](insp_clp_anim_com.md) and [Playable Asset properties](insp_clp_anim_plyb.md) for the selected Animation clip.
|
||||
|
||||

|
||||
|
||||
_Inspector window when selecting an Animation clip in the Timeline window_
|
||||
|
||||
If you select multiple Timeline Assets, tracks, or clips, the Inspector window shows two sections: a section with properties that apply to the entire selection, and a section of common properties that apply to each selected object individually.
|
||||
|
||||
For example, if you select an Audio clip on one track and two Animation clips on another track, the Inspector window includes **Multiple Clip Timing** properties and **Clip Timing** properties:
|
||||
|
||||
* Use the **Multiple Clip Timing** properties to change the **Start** or **End** of the selection as a group. For example, if you change the **Start** to frame 30, the selection of clips start at frame 30. This moves the start of the first clip to frame 30 and the remaining selected clips are placed relative to the first clip, respecting gaps between selected clips.
|
||||
* Use the **Clip Timing** properties to change the common properties for each selected clip. If the selected clips have different values for the same property, the value is represented with a dash ("-"). If you change the dash to a value, it sets the value for all selected clips. For example, if you change the **Ease In Duration** from a dash to 10 frames, the ease in of each selected clip changes to 10 frames.
|
||||
|
||||

|
||||
|
||||
_Inspector window when selecting multiple clips, on multiple tracks, in the Timeline window_
|
||||
|
||||
If your selection does not have common properties, the Inspector window prompts you to narrow the selection. For example, if you select an Animation track and an Audio clip in the Timeline window, you are prompted to narrow the selection:
|
||||
|
||||

|
||||
|
||||
_The message in the Inspector window when the selection does not have common properties_
|
@ -0,0 +1,16 @@
|
||||
# Setting clip properties
|
||||
|
||||
Use the Inspector window to change the name of a clip and other properties, such as its timing and blend properties. The available properties depend on the type of clip selected. For example, select an Activation clip to change its name and set its **Clip Timing**.
|
||||
|
||||

|
||||
|
||||
_Inspector window when selecting an Activation clip in the Timeline window_
|
||||
|
||||
Not all clips have properties. See the following sections for clips with properties:
|
||||
|
||||
* [Activation clip properties](insp_clp_act.md)
|
||||
* [Animation clip common properties](insp_clp_anim_com.md)
|
||||
* [Animation clip Playable Asset properties](insp_clp_anim_plyb.md)
|
||||
* [Audio clip properties](insp_clp_aud.md)
|
||||
* [Control clip common properties](insp_clp_ctrl_com.md)
|
||||
* [Control clip Playable Asset properties](insp_clp_ctrl_plyb.md)
|
@ -0,0 +1,25 @@
|
||||
# Activation clip properties
|
||||
|
||||
Use the Inspector window to change the name of an Activation clip and its **Clip Timing**.
|
||||
|
||||

|
||||
|
||||
_Inspector window when selecting an Activation clip in the Timeline window_
|
||||
|
||||
## Display Name
|
||||
|
||||
The name of the Activation clip shown in the Timeline window. By default, each Activation clip is named "Active".
|
||||
|
||||
## Clip Timing properties
|
||||
|
||||
Use the **Clip Timing** properties to change the position and duration of the Activation clip.
|
||||
|
||||
Most timing properties are expressed in both seconds (s) and frames (f). When specifying seconds to modify a **Clip Timing** property, all decimal values are accepted. When specifying frames, only integer values are accepted. For example, if you attempt to enter 12.5 in a frames (f) field, it is set to 12 frames.
|
||||
|
||||
Depending on [the selected Clip Edit mode](clp_about.md), changing the **Start**, **End**, or **Duration** may ripple or replace Activation clips on the same track.
|
||||
|
||||
|**Property** |**Description** |
|
||||
|:---|:---|
|
||||
|**Start**|The frame or time (in seconds) when the clip starts.<br />Changing the Start also affects the End. Changing the Start sets the End to the new Start value plus the Duration.|
|
||||
|**End**|The frame or time (in seconds) when the clip ends.<br />Changing the End also affects the Start. Changing the End sets the Start to the new End value minus the Duration.|
|
||||
|**Duration**|The duration of the clip in frames or seconds.<br />Changing the Duration also affects the End. Changing the Duration sets the End to the Start value plus the new Duration.|
|
@ -0,0 +1,47 @@
|
||||
# Animation clip common properties
|
||||
|
||||
Use the Inspector window to change the common properties of an Animation clip. The common properties of an Animation clip include its name, timing, play speed, blend properties, and extrapolation settings.
|
||||
|
||||

|
||||
|
||||
_Inspector window when selecting an Animation clip in the Timeline window_
|
||||
|
||||
## Display Name
|
||||
|
||||
The name of the Animation clip shown in the Timeline window.
|
||||
|
||||
## Clip Timing properties
|
||||
|
||||
Use the **Clip Timing** properties to position, change the duration, change the ease-in and ease-out duration, choose the extrapolation mode, and adjust the play speed of the Animation clip.
|
||||
|
||||
Most timing properties are expressed in both seconds (s) and frames (f). When specifying seconds, a **Clip Timing** property accepts decimal values. When specifying frames, a property only accepts integer values. For example, if you attempt to enter 12.5 in a frames (f) field, the Inspector window sets the value to 12 frames.
|
||||
|
||||
Depending on the [selected Clip Edit mode](clp_about.md), changing the **Start**, **End**, or **Duration** may blend, ripple, or replace Animation clips on the same track.
|
||||
|
||||
|**Property** |**Description** |
|
||||
|:---|:---|
|
||||
|**Start**|The frame or time (in seconds) when the clip starts. Changing the Start changes the position of the clip on its track in the Timeline Asset.<br />Changing the Start also affects the End. Changing the Start sets the End to the new Start value plus the Duration.|
|
||||
|**End**|The frame or time (in seconds) when the clip ends.<br />Changing the End also affects the Start. Changing the End sets the Start to the new End value minus the Duration.|
|
||||
|**Duration**|The duration of the clip in frames or seconds.<br />Changing the Duration also affects the End. Changing the Duration sets the End to the Start value plus the new Duration.|
|
||||
|**Ease In Duration**|Sets the number of seconds or frames that it takes for the clip to ease in. If the beginning of the clip overlaps and blends with another clip, the Ease In Duration cannot be edited and instead shows the duration of the blend between clips. See [Blending clips](clp_blend.md).|
|
||||
|**Ease Out Duration**|Sets the number of seconds or frames that it takes for the clip to ease out. If the end of the clip overlaps and blends with another clip, the Ease Out Duration cannot be edited and instead shows the duration of the blend between clips. In this case, trim or position the clip to change the duration of the blend between clips. See [Blending clips](clp_blend.md).|
|
||||
|**Clip In**|Sets the offset of when the source clip should start playing. For example, to play the last 10 seconds of a 30 second Animation clip, set Clip In to 20 seconds.|
|
||||
|**Speed Multiplier**|A multiplier on the playback speed of the clip. This value must be greater than 0. Changing this value changes the duration of the clip.|
|
||||
|
||||
## Animation Extrapolation
|
||||
|
||||
Use the **Animation Extrapolation** properties to set the gap extrapolation before and after an Animation clip. The term **gap extrapolation** refers to how an Animation track approximates or extends animation data in the gaps before, between, and after the Animation clips on a track.
|
||||
|
||||
There are two properties for [setting the gap extrapolation](clp_gap_extrap.md) between Animation clips. The **Pre-Extrapolate** property only appears for Animation clips.
|
||||
|
||||
|**Property** |**Description** |
|
||||
|:---|:---|
|
||||
|**Pre-Extrapolate**|Controls how animation data is approximated in the gap before an Animation clip. The Pre-Extrapolate property affects the easing-in of an Animation clip.|
|
||||
|**Post-Extrapolate**|Controls how animation data extends in the gap after an Animation clip. The Post-Extrapolate property affects the easing-out of an Animation clip.|
|
||||
|
||||
|
||||
## Blend Curves
|
||||
|
||||
Use the **Blend Curves** to customize the transition between the outgoing and incoming Animation clips. See [Blending clips](clp_blend.md) for details on how to blend clips and customize blend curves.
|
||||
|
||||
When easing-in or easing-out clips, use the **Blend Curves** to customize the curve that eases-in or eases-out an Animation clip. See [Easing-in and Easing-out clips](clp_ease.md) for details.
|
@ -0,0 +1,44 @@
|
||||
# Animation clip Playable Asset properties
|
||||
|
||||
Use the Inspector window to change the Playable Asset properties of an Animation clip. These properties include controls for manually applying position and rotation clip offsets, and options for overriding default clip matching.
|
||||
|
||||
To view the Playable Asset properties for an Animation clip, select an Animation clip in the Timeline window and expand **Animation Playable Asset** in the Inspector window.
|
||||
|
||||

|
||||
|
||||
_Inspector window showing the **Animation Playable Asset** properties for the selected Animation clip_
|
||||
|
||||
## Animation Clip
|
||||
|
||||
Use the **Animation Clip** to change the source asset used by the clip on the Animation track. The source asset is either a [recorded Infinite clip](wf_rec_anim.md) or an [external motion clip](wf_char_anim.md).
|
||||
|
||||
## Clip Transform Offsets
|
||||
|
||||
Use the **Clip Transform Offsets** area to manually apply position and rotation offsets to the selected Animation clip. The tools and properties underneath the Clip Transform Offsets provide two methods of manually applying offsets based on the selected source:
|
||||
|
||||
|**Property:** |**Description:** |
|
||||
|:---|:---|
|
||||
|**Move tool**|Shows a Move Gizmo in the Scene view. Use the Move Gizmo to manually position the clip offset for the selected Animation clip. Using the Move Gizmo changes the Position coordinates.|
|
||||
|**Rotate tool**|Shows a Rotate Gizmo in the Scene view. Use the Rotate Gizmo to manually rotate the clip offset for the selected Animation clip. Using the Rotate Gizmo changes the Rotation coordinates.|
|
||||
|**Position**|Manually sets the clip offset in X, Y, and Z coordinates. By default, the Position coordinates are set to zero and are relative to the [track offsets](insp_trk_anim.md).|
|
||||
|**Rotation**|Manually sets the clip rotation offset around the X, Y, and Z axes. By default, the Rotation axes are set to zero and are relative to the [track offsets](insp_trk_anim.md).|
|
||||
|
||||
You can also [automatically match the clip offsets](clp_match.md) based on the end of the previous Animation clip, or the start of the next Animation clip. The transforms that are matched depends on the **Offset Match Fields**.
|
||||
|
||||
## Offsets Match Fields
|
||||
|
||||
Use **Offsets Match Fields** to choose which transforms to match when [matching clip offsets](clp_match.md). By default, **Use Defaults** is enabled and uses the default matching options set for the [Animation track](insp_trk_anim.md).
|
||||
|
||||
Disable **Use Defaults** to override the track matching options and choose which transformations to match when performing a Match Offsets to Previous Clip or Match Offsets to Next Clip for the selected Animation clip. When you disable **Offsets Match Fields**, a series of additional checkboxes appear. Use these additional checkboxes to enable or disable matching per coordinate, for both position and rotation.
|
||||
|
||||
## Remove Start Offset
|
||||
|
||||
Enable **Remove Start Offset** to make the Animation clip begin at position zero and rotation zero. The rest of the position and rotation keys in the Animation clip follow from zero. Enabling **Remove Start Offset** makes it easier to match the Animation clip with the previous Animation clip.
|
||||
|
||||
Disable **Remove Start Offset** to keep the starting position and rotation. The Animation clip starts from its original position and rotation.
|
||||
|
||||
## Foot IK
|
||||
|
||||
Enable **Foot IK** if the Animation clip is animating a humanoid and you want to use inverse kinematics for foot solving. Inverse kinematics attempts to remedy foot sliding by solving and influencing foot placement from the foot to the hip of the humanoid.
|
||||
|
||||
Disable Foot IK if the Animation clip is animating a non-humanoid object such as a moving platform or a quadruped character with a non-human bone structure.
|
@ -0,0 +1,35 @@
|
||||
# Audio clip properties
|
||||
|
||||
Use the Inspector window to change the properties of an Audio clip. These properties include the name, timing, play speed, blend properties, audio media, and loop option.
|
||||
|
||||

|
||||
|
||||
_Inspector window when selecting an Audio clip in the Timeline window_
|
||||
|
||||
## Display Name
|
||||
|
||||
The name of the Audio clip shown in the Timeline window. This is not the name of the audio file that Unity uses for the waveform. For information on audio file properties, see **Audio Playable Asset** below.
|
||||
|
||||
## Clip Timing properties
|
||||
|
||||
Use the **Clip Timing** properties to position, change the duration, change the ease-in and ease-out duration, and adjust the play speed of the Audio clip.
|
||||
|
||||
Most timing properties are expressed in both seconds (s) and frames (f). When specifying seconds, a **Clip Timing** property accepts decimal values. When specifying frames, a property only accepts integer values. For example, if you attempt to enter 12.5 in a frames (f) field, the Inspector window sets the value to 12 frames.
|
||||
|
||||
Depending on [the selected Clip Edit mode](clp_about.md), changing the **Start**, **End**, or **Duration** may blend, ripple, or replace Audio clips on the same track.
|
||||
|
||||
|**Property** |**Description** |
|
||||
|:---|:---|
|
||||
|**Start**|The frame or time (in seconds) when the clip starts. Changing the Start property changes the position of the clip on its track in the Timeline Asset.<br />Changing the Start also affects the End. Changing the Start sets the End to the new Start value plus the Duration.|
|
||||
|**End**|The frame or time (in seconds) when the clip ends.<br />Changing the End also affects the Start. Changing the End sets the Start to the new End value minus the Duration.|
|
||||
|**Duration**|The duration of the clip in frames or seconds.<br />Changing the Duration also affects the End. Changing the Duration sets the End to the Start value plus the new Duration.|
|
||||
|
||||
## Blend Curves
|
||||
|
||||
Use the **Blend Curves** to customize the fade-in and fade-out between the outgoing and incoming Audio clips. See [Blending clips](clp_blend.md) for details on how to blend clips and customize blend curves.
|
||||
|
||||
When easing-in or easing-out Audio clips, use the **Blend Curves** to customize the curve that fades-in or fades-out an Audio clip. See [Easing-in and Easing-out clips](clp_ease.md) for details.
|
||||
|
||||
## Audio Playable Asset
|
||||
|
||||
Use the **Audio Playable Asset** properties to select the Audio file used by the Audio clip and to set whether the selected Audio clip loops (**Loop** enabled) or plays once (**Loop** disabled).
|
@ -0,0 +1,34 @@
|
||||
# Control clip common properties
|
||||
|
||||
Use the Inspector window to change the common properties of a Control clip. You can only create a Control clip in a Control track. A Control clip is a special clip that controls a nested Timeline instance, Particle System, Prefab instance, or ITimeControl Script, depending on how you create the Control clip:
|
||||
|
||||
* If you create the Control clip from a GameObject with a Playable Director component associated with a Timeline Asset, then the Control clip controls a nested Timeline instance. If the GameObject parents other GameObjects associated with many Timeline Assets, then the Control clip controls multiple Timeline instances.
|
||||
* If you create the Control clip from a GameObject with a Particle System component, then the Control clip controls a Particle System.
|
||||
* If you create the Control clip from a GameObject linked to a Prefab, then the Control clip controls a Prefab instance.
|
||||
* If you create the Control clip from a GameObject with a script that implements the ITimeControl interface, then the Control clip controls an ITimeControl Script.
|
||||
|
||||
The common properties of a Control clip include its name and Clip Timing properties. Not all common properties apply to all types of Control clips.
|
||||
|
||||

|
||||
|
||||
_Inspector window when selecting a Control clip in the Timeline window_
|
||||
|
||||
## Display Name
|
||||
|
||||
The name of the Control clip shown in the Timeline window.
|
||||
|
||||
## Clip Timing properties
|
||||
|
||||
Use the **Clip Timing** properties to position and change the duration of the Control clip.
|
||||
|
||||
Most timing properties are expressed in both seconds (s) and frames (f). When specifying seconds, a **Clip Timing** property accepts decimal values. When specifying frames, a property only accepts integer values. For example, if you attempt to enter 12.5 in a frames (f) field, the Inspector window sets the value to 12 frames.
|
||||
|
||||
Depending on the [selected Clip Edit mode](clp_about.md), changing the **Start**, **End** or **Duration** of a Control clip may create an insert or replace clips on the same track. You cannot create a blend between Control clips.
|
||||
|
||||
|**Property:** |**Description:** |
|
||||
|:---|:---|
|
||||
|**Start**|The frame or time (in seconds) when the Control clip starts. Changing the Start changes the position of the Control clip on its track in the Timeline Asset.<br />Changing the Start also affects the End. Changing the Start sets the End to the new Start value plus the Duration.|
|
||||
|**End**|The frame or time (in seconds) when the Control clip ends.<br />Changing the End also affects the Start. Changing the End sets the Start to the new End value minus the Duration.|
|
||||
|**Duration**|The duration of the clip in frames or seconds.<br />Changing the Duration also affects the End. Changing the Duration sets the End to the Start value plus the new Duration.|
|
||||
|**Clip In**|Sets the offset of when the Control clip starts playing. The Clip In property only affects Particle Systems and nested Timeline instances.|
|
||||
|**Speed Multiplier**|A speed multiplier that affects the playback speed of the Control clip. This value must be greater than 0. The Speed Multiplier property only affects Particle Systems and nested Timeline instances.|
|
@ -0,0 +1,45 @@
|
||||
# Control clip Playable Asset properties
|
||||
|
||||
Use the Inspector window to change the playable asset properties of a Control clip. To view the playable asset properties for a Control clip, select a Control clip in the Timeline window and expand **Control Playable Asset** in the Inspector window.
|
||||
|
||||

|
||||
|
||||
_Inspector window showing the **Control Playable Asset** properties for the selected Control clip_
|
||||
|
||||
## Source Game Object
|
||||
|
||||
Use **Source Game Object** to select the GameObject with the Particle System, nested Timeline instance, or ITimeControl Script for the selected Control clip. Changing the **Source Game Object** changes what the Control clip controls.
|
||||
|
||||
## Prefab
|
||||
|
||||
Use **Prefab** to select a Prefab to instantiate when the Timeline instance plays in Play Mode. When a Prefab is selected, the label of the **Source Game Object** property changes to **Parent Object**.
|
||||
|
||||
When in Play Mode, the Prefab is instantiated as a child of the **Parent Object**. Although the Prefab is instantiated at the start of the Timeline instance, the Prefab is only activated during the Control clip. When the Control clip ends, the Prefab instance is deactivated.
|
||||
|
||||
## Control Activation
|
||||
|
||||
Enable **Control Activation** to activate the **Source Game Object** while the Control clip plays. Disable this property to activate the **Source Game Object** during the entire Timeline instance.
|
||||
|
||||
The **Control Activation** property only affects Control clips that control a nested Timeline instance or a Particle System.
|
||||
|
||||
## Post Playback
|
||||
|
||||
When **Control Activation** is enabled, use the **Post Playback** property to set the activation state for the nested Timeline instance when the main Timeline stops playing. The **Post Playback** property only affects nested Timeline instances.
|
||||
|
||||
|**Post-Playback State** |**Description** |
|
||||
|:---|:---|
|
||||
|**Active**|Activates the Source Game Object after the nested Timeline instance finishes playing.|
|
||||
|**Inactive**|Deactivates the Source Game Object after the nested Timeline instance finishes playing.|
|
||||
|**Revert**|Reverts the Source Game Object to its activation state before the nested Timeline instance began playing.|
|
||||
|
||||
|
||||
## Advanced properties
|
||||
|
||||
Use the Advanced properties to select additional functionality based on whether the Control clip controls a Playable Director, Particle System, or ITimeControl Script. The Advanced properties do not apply to all Control clips.
|
||||
|
||||
|**Property** |**Description** |
|
||||
|:---|:---|
|
||||
|**Control Playable Directors**|Enable this property if the Source Game Object is attached to a Playable Director and you want the Control clip to control the nested Timeline instance associated with this Playable Director.|
|
||||
|**Control Particle Systems**|Enable this property when the Control clip includes a Particle System. Set the value of the Random Seed property to create a unique, repeatable effect.|
|
||||
|**Control ITimeControl**|Enable this property to control ITimeControl scripts on the Source GameObject. To use this feature, the Source Game Object must have a script that implements the ITimeControl interface.|
|
||||
|**Control Children**|Enable this property if the Source Game Object has a child GameObject with either a Playable Director, Particle System, or ITimeControl Script, and you want the Control clip to control this child component.<br /><br />For example, if the Source Game Object is a GameObject that parents another GameObject with a Particle System, enable this property to make the Control clip control the Particle system on the child GameObject.|
|
@ -0,0 +1,15 @@
|
||||
# Setting Timeline Asset properties
|
||||
|
||||
Use the Inspector window to set the frame rate, the duration mode, and a fixed length for the selected Timeline Asset. From the Project window, select a Timeline Asset to view its properties.
|
||||
|
||||

|
||||
|
||||
_Inspector window when selecting a Timeline Asset in the Project window_
|
||||
|
||||
|**Property**||**Description**|
|
||||
|:---|:---|:---|
|
||||
|**Frame Rate**||Sets the reference frame rate for the Timeline Asset and its Timeline instances. Change the Frame Rate to align clips at precise frames but changing the Frame Rate is only visual and has no effect on play speed, keys, tracks, or clips.<br /><br/>Timeline supports the following standard frame rates: 24 (PAL), 25 (NTSC), 30, 50, and 60. Timeline also supports custom frame rates from 1e-6 to 1000.<br /><br />To set a custom frame rate, enter a non-standard frame rate for the Frame Rate property. In the [Timeline Settings](tl_settings.md) menu, the Custom menu item is enabled and automatically selected for the Timeline instance. The Custom menu item shows the custom frame rate in parentheses.|
|
||||
| **Duration Mode**||Choose whether the duration of the Timeline Asset extends to the end of the last clip or ends at a specific time or frame.|
|
||||
||Based On Clips|Sets the length of the Timeline Asset based on the end of the last clip.|
|
||||
||Fixed Length|Sets the length of the Timeline Asset to a specific number of seconds or frames.|
|
||||
| **Duration**||Shows the length of the Timeline Asset in seconds and frames when the Duration Mode is set to Based on Clips.<br /><br/>Sets the length of the Timeline Asset to a specific number of seconds or frames when the Duration Mode is set to Fixed Length.|
|
@ -0,0 +1,12 @@
|
||||
# Setting track properties
|
||||
|
||||
Use the Inspector window to change the name of a track and its properties. The available properties depend on the type of track selected. For example, select an Animation Track to set how track offsets are applied, to apply an avatar mask, and to select which transforms are modified when matching offsets between Animation clips.
|
||||
|
||||

|
||||
|
||||
_Inspector window when selecting an Animation track in the Timeline window_
|
||||
|
||||
Not all tracks have properties. See the following sections for tracks with properties:
|
||||
|
||||
* [Activation Track properties](insp_trk_act.md)
|
||||
* [Animation Track properties](insp_trk_anim.md)
|
@ -0,0 +1,16 @@
|
||||
# Activation track properties
|
||||
|
||||
Use the Inspector window to change the name of an Activation track and set the state of its bound GameObject when the Timeline Asset finishes playing.
|
||||
|
||||

|
||||
|
||||
_Inspector window when selecting an Activation track in the Timeline window_
|
||||
|
||||
|**Property**||**Description**|
|
||||
|:---|:---|:---|
|
||||
|**Display Name**||The name of the Activation track shown in the Timeline window and Playable Director component. The Display Name applies to the Timeline Asset and all of its Timeline instances.|
|
||||
|**Post-playback state**||Sets the activation state for the bound GameObject when the Timeline Asset stops playing. The Post-playback state applies to the Timeline Asset and all of its Timeline instances.|
|
||||
||Active|Activates the bound GameObject when the Timeline Asset finishes playing.|
|
||||
||Inactive|Deactivates the bound GameObject when the Timeline Asset finishes playing.|
|
||||
||Revert|Reverts the bound GameObject to its activation state before the Timeline Asset began playing.<br /><br />For example, if the Timeline Asset finishes playing with the GameObject set to inactive, and the GameObject was active before the Timeline Asset began playing, then the GameObject reverts to active.|
|
||||
||Leave As Is|Sets the activation state of the bound GameObject to the state the Timeline Asset is at when it finishes playing.<br /><br />For example, if the Timeline Asset finishes playing with the GameObject set to inactive, the GameObject remains inactive.|
|
@ -0,0 +1,22 @@
|
||||
# Animation track properties
|
||||
|
||||
Use the Inspector window to change the name of an Animation track, set how track offsets are applied, apply an avatar mask, and set which transforms are modified by default when you [match clip offsets](clp_match.md).
|
||||
|
||||

|
||||
|
||||
_Inspector window when selecting an Animation track in the Timeline window_
|
||||
|
||||
|**Property** ||**Description** |
|
||||
|:---|:---|:---|
|
||||
|**Display Name**||The name of the Animation track shown in the Timeline window and in the Playable Director component. The Display Name applies to the Timeline Asset and all of its Timeline instances.|
|
||||
|**Track Offsets**||Applies a position and rotation offset to the start of each Animation clip on the selected Animation track. The position and rotation offset starts from a specific position and rotation or from the position and rotation relative to a state machine or another Timeline instance.|
|
||||
||Apply Transform Offsets|Starts the animation in each Animation clip from a specific position and rotation offset. Use the Move and Rotate tools, and the Position and Rotation fields, to set the starting position and rotation.|
|
||||
||Apply Scene Offsets|Starts the animated GameObject from its current position and rotation in the Scene. Use this mode to build a Timeline instance that transitions to and from a state machine or to and from another Timeline instance.|
|
||||
||Auto (deprecated)|If you load a Scene or Project that was built before 2018.3, Track Offsets is automatically set to Auto (deprecated). This is a special mode for backwards compatibility.<br /><br />After opening an old Project, choose another Track Offsets mode because the Auto (deprecated) offset disables key animation recording.|
|
||||
||Move tool|Enable the Move tool to show the Move Gizmo in the Scene view. Use the Move Gizmo to visually position the transform offset. Positioning the Move Gizmo changes the Position properties.<br /><br />The Move tool only appears when Track Offsets is set to Apply Transform Offsets.|
|
||||
||Rotate tool|Enable the Rotate tool to show the Rotate Gizmo in the Scene view. Use the Rotate Gizmo to visually rotate the track offset. Rotating the Rotate Gizmo changes the Rotation properties.<br /><br />The Rotate tool only appears when Track Offsets is set to Apply Transform Offsets.|
|
||||
||Position|Sets the track position offset in X, Y, and Z coordinates. The Position fields only appears when Track Offsets is set to Apply Transform Offsets.|
|
||||
||Rotation|Sets the track rotation offset in X, Y, and Z coordinates. The Rotation fields appear when Track Offsets is set to Apply Transform Offsets.|
|
||||
|**Apply Avatar Mask**||Enables Avatar masking. When enabled, Timeline applies the animation of all Animation clips on the track based on the selected Avatar Mask.|
|
||||
||Avatar Mask|Selects the Avatar Mask applied to all Animation clips on the Animation track.<br />An Avatar Mask defines which humanoid body parts are animated by Animation clips on the selected Animation track. The body parts that are masked are animated by other Animation tracks in the Timeline Asset.<br /><br />For example, you can use an Avatar Mask to combine the lower-body animation on an Animation track with the upper body animation on an [Override Animation track](wf_mask.md).|
|
||||
|**Default Offset Match Fields**||Expand to display a series of checkboxes that choose which transforms are matched when [matching clip offsets](clp_match.md) between Animation clips.<br /><br />The Default Offset Match Fields set the default matching options for all Animation clips on the same track. Use the [Animation Playable Asset properties](insp_clp_anim_plyb.md) to override these defaults for each Animation clip.|
|
@ -0,0 +1,26 @@
|
||||
# Playable Director component
|
||||
|
||||
The Playable Director component stores the link between a Timeline instance and a Timeline Asset. The Playable Director component controls when the Timeline instance plays, how the Timeline instance updates its clock, and what happens when the Timeline instance finishes playing.
|
||||
|
||||

|
||||
|
||||
_Playable Director component added to the GameObject named Ground. The GameObject is associated with the GroundCTL Timeline Asset._
|
||||
|
||||
The Playable Director component also shows the list of tracks from the associated Timeline Asset (**Playable** property) that animate GameObjects in the Scene. The link between Timeline Asset tracks and GameObjects in the Scene is referred to as **binding** or **Track binding**. For more on binding and the relationship between Timeline Assets and Timeline instances, see [Timeline overview](tl_about.md).
|
||||
|
||||
|**Property** ||**Description** |
|
||||
|:---|:---|:---|
|
||||
|**Playable**||Associates a Timeline Asset with a GameObject in the Scene.<br />When you make this association, you create a Timeline instance for the selected Timeline Asset. After you create a Timeline instance, you can use the other properties in the Playable Director component to control the instance and choose which GameObjects in the Scene are animated by the Timeline Asset.|
|
||||
|**Update Method**||Sets the clock source that the Timeline instance uses to update its timing.|
|
||||
||DSP|Select for sample accurate audio scheduling. When selected, the Timeline instance uses the same clock source that processes audio. DSP stands for digital signal processing.|
|
||||
||Game Time|Select to use the same clock source as the game clock. This clock source is affected by [time scaling](https://docs.unity3d.com/Manual/TimeFrameManagement.html).|
|
||||
||Unscaled Game Time|Select to use the same clock source as the game clock, but without being affected by time scaling.|
|
||||
||Manual|Select to not use a clock source and to manually set the clock time through scripting.|
|
||||
|**Play on Awake**||Whether the Timeline instance is played when game play is initiated. By default, a Timeline instance is set to begin as soon as the Scene begins playback. To disable the default behaviour, disable the Play on Awake option in the Playable Director component.|
|
||||
|**Wrap Mode**||The behaviour when the Timeline instance ends playback.|
|
||||
||Hold|Plays the Timeline instance once and holds on the last frame until playback is interrupted.|
|
||||
||Loop|Plays the Timeline instance repeatedly until playback is interrupted.|
|
||||
||None|Plays the Timeline instance once.|
|
||||
|Initial Time||The time (in seconds) at which the Timeline instance begins playing. The Initial Time adds a delay in seconds before the Timeline instance actually begins. For example, when Play On Awake is enabled and Initial Time is set to five seconds, if you click the Play button in the Unity Toolbar, [Play Mode](https://docs.unity3d.com/Manual/GameView.html) starts and the Timeline instance begins five seconds later.|
|
||||
|**Current Time**||Views the progression of time according to the Timeline instance in the Timeline window. The Current Time field matches the Playhead Location field.<br />Use the Current Time field when the Timeline window is hidden. The Current Time field appears in the Playable Director Component when in Timeline Playback mode or when Unity is in Game Mode.|
|
||||
|**Bindings**||Shows the link between GameObjects in the Scene with tracks from the associated Timeline Asset (Playable property). The Bindings area is split into two columns:<br />The first column lists the tracks from the Timeline Asset. Each track is identified by an icon and its track type.<br />The second column lists the GameObject linked (or bound) to each track.<br />The Bindings area does not list Track groups, Track sub-groups, or tracks that do not animate GameObjects. The Timeline window shows the same bindings in the [Track list](trk_list_about.md).|
|
@ -0,0 +1,65 @@
|
||||
# Samples
|
||||
|
||||
## Gameplay Sequence Demo
|
||||
|
||||

|
||||
|
||||
This sample demonstrates how Timeline can be used to create a small in-game moment, using built-in tracks.
|
||||
|
||||
### Overview
|
||||
|
||||
In this example, we have a `Player` character jogging and then colliding with another character. The `Player` character represents our gameplay character and is using a looping jog animation. The Timeline then takes control of the player character, collides with the other character, then returns to his original gameplay animation (jog) once the Timeline has finished. Note that the gameplay animation is driven by an Animator and will only play at runtime. The character will be in a T-Stance pose for the runtime portion when using the Timeline preview.
|
||||
|
||||
### Timeline Structure
|
||||
|
||||
This sample uses the following tracks: Activation, Animation, Audio, Control and Marker track. The `GameplaySequence` timeline has been organized in the following groups: `Building`, `Lights`, `Cameras`, `Characters`, `Audio` and `Props`.
|
||||
|
||||
#### *Building group*
|
||||
|
||||
This group contains two Control tracks: `Building Spawn` which spawns the building prefab, and `Building Particles` that controls two particle systems in the scene (`ElectricalSparks` and `SandSwirlsEffect`).
|
||||
|
||||
#### *Lights group*
|
||||
|
||||
This group contains two Animation tracks; one for the Sun light, and the other for the flickering light. Both tracks where animated in Unity and the curves can be seen by enabling the curves icon or double clicking on the track to open the Animation window. `Sun light` is animated in Rotation (sunrise) and the `Point light` has a spiked `Intensity` curve.
|
||||
|
||||
#### *Cameras group*
|
||||
|
||||
This group contains two cameras: `Main camera` using an Animation track, and `Follow camera` using an Activation track. `Main Camera` has an animation curve for the continuous movement (which can be seen by enabling the curves icon) and two override tracks, one for each character. The clips on the override tracks have static values for a fixed camera shot. `Follow camera` is simply parented child of the Player character's root and activated for the follow-cam shots.
|
||||
|
||||
#### *Characters group*
|
||||
|
||||
The first track is an Animation track for the `Player`character. Notice that clip pre and post extrapolations are set to `None`, meaning the character will not be influenced by the timeline during these gaps. At runtime, these gaps mean the `Player` character will be using his Animator state, jog. The second track is an Activation track for the second character, making his appear in the scene. The third and last track is an Animation track for the second character. On this track, the second character blends from one clip to another creating a cinematic sequence.
|
||||
|
||||
#### *Audio group*
|
||||
|
||||
This group contains four Audio tracks; `Player`, `crickets`, `neon-light` & `character2`. The `Player` track has a jog/breathing and bump clip. The `crickets` track has pan and volume animation curves (can be seen by enabling the curves icon). The `neon-light` sound is for the flickering `Point` light. The `Character2` tracks contains all audio clips for this second character.
|
||||
|
||||
#### *Props group*
|
||||
|
||||
This group animates `Table` and `Can`. The first Activation track makes `Table` appear in the scene. The second Activation track makes a static version of `Can` appear in the scene. The third track is an Animation track that animates the table bump animation. The last track is a Control track with a sub-timeline for the can animation. The static version of the can is disabled and replaced with the animated version when the Control clip starts. Double-clicking the Control track clip will enter the `Can` sub-timeline.
|
||||
|
||||
#### `Can` Sub-Timeline
|
||||
|
||||
This sub-timeline contains an Animation track for the can rolling off the table and bouncing on the ground, an Audio track for the sounds effects and a Control track for the liquid particles splashing out of the can.
|
||||
|
||||
#### Marker track
|
||||
|
||||
In the Timeline window, under the time ruler, there is a Marker track with one Signal at frame 1200. This is the Signal marker that triggers the jog audio clip on `Player` once the timeline finishes the gameplay jog.
|
||||
|
||||
## Customization samples
|
||||
|
||||

|
||||
|
||||
This sample includes tracks, clips, markers and actions that demonstrate how to extend and customize timeline in different ways.
|
||||
|
||||
* [Annotation](smpl_custom_annotation.md): provides a marker that can be used as a bookmark.
|
||||
* [Video track](smpl_custom_video.md): provides a track capable of playing video clips.
|
||||
* [Time dilation track](smpl_custom_time.md): provides a track that can be used to adjust Unity's global `Time.timeScale`.
|
||||
* [Tween track](smpl_custom_tween.md): provides a track that can be used for simple transform movements.
|
||||
* [Text track](smpl_custom_text.md): provides a track that can be used to display different messages to the screen using a TextMeshPro Text component.
|
||||
|
||||
### Demo
|
||||
|
||||

|
||||
|
||||
Included is a demo timeline that showcases all the of the above samples.
|
@ -0,0 +1,224 @@
|
||||
# Annotation marker sample
|
||||
|
||||
The Annotation sample provides a marker that can be used as a bookmark for your timeline.
|
||||
|
||||

|
||||
|
||||
Here are the options available on an annotation:
|
||||
Field | Description
|
||||
--- | ---
|
||||
Title | The annotation's title. This will be displayed as a tooltip, when hovering the mouse on the annotation.
|
||||
Color | The annotation's color in the Timeline window.
|
||||
Show line overlay | Use this option to show a vertical line that spans the full height of the Timeline window.
|
||||
|
||||
## Custom marker workflow example
|
||||
|
||||
This example will demonstrate how to:
|
||||
|
||||
* create a custom marker;
|
||||
* customize a marker with `MarkerEditor`;
|
||||
* use a custom USS style to draw a marker;
|
||||
* add additional commands with `Actions`;
|
||||
|
||||
### 1. Create an annotation marker
|
||||
|
||||
A marker is an item that can be added to a Timeline Asset and is used to represent a point in time.
|
||||
Markers also have a specialization, just like clips (Activation clip, Audio clip, Animation clip, etc).
|
||||
|
||||
In order to add a new type of marker, all we need to do is to create a class that inherits the `Marker` class:
|
||||
|
||||
``` c#
|
||||
public class AnnotationMarker : UnityEngine.Timeline.Marker {}
|
||||
```
|
||||
|
||||
This custom marker can now be added to any track or on the timeline marker area:
|
||||
|
||||

|
||||
|
||||
We can add a title, description and color to the annotation:
|
||||
|
||||
``` c#
|
||||
public class AnnotationMarker : Marker
|
||||
{
|
||||
public string title;
|
||||
public Color color;
|
||||
public string description;
|
||||
public bool showLineOverlay;
|
||||
}
|
||||
```
|
||||
|
||||
The annotation marker itself is now complete. But the customization work is not done yet. Timeline offers many customization abilities.
|
||||
|
||||
## 2. Customize the marker's appearance
|
||||
|
||||
A marker's appearance can be customized using a USS style or with `MarkerEditor`. Both paths have their advantages and drawbacks.
|
||||
|
||||
### Custom USS style
|
||||
|
||||
A marker can use a USS style to specify its appearance. For more information on how to create custom USS styles, see [how to define custom USS styles](uss_styles.md).
|
||||
|
||||
The [CustomStyle](xref:UnityEngine.Timeline.CustomStyleAttribute) attribute can be used to specify a style for a given marker:
|
||||
|
||||
``` c#
|
||||
[CustomStyle("AnnotationStyle")]
|
||||
public class AnnotationMarker : Marker
|
||||
{
|
||||
//...
|
||||
}
|
||||
```
|
||||
|
||||
`AnnotationStyle` is defined in a USS stylesheet and will be used when a marker is displayed on screen:
|
||||
|
||||

|
||||
|
||||
USS styles are useful if the desired appearance is simple (i.e. when only using a texture icon). For more complex stuff (i.e. dynamically changing a marker's color), a `MarkerEditor` will be needed.
|
||||
|
||||
### Custom editor
|
||||
|
||||
`MarkerEditor` can be used to augment the capabilities of a marker in the editor. It works like a custom [Inspector](https://docs.unity3d.com/ScriptReference/CustomEditor.html); the [CustomTimelineEditor attribute](xref:UnityEditor.Timeline.CustomTimelineEditorAttribute) is used to tell Timeline that a [MarkerEditor](xref:UnityEditor.Timeline.MarkerEditor) class should be associated to a given marker.
|
||||
|
||||
``` c#
|
||||
[CustomTimelineEditor(typeof(AnnotationMarker))]
|
||||
public class AnnotationMarkerEditor : MarkerEditor
|
||||
{
|
||||
//...
|
||||
}
|
||||
```
|
||||
|
||||
#### Marker information
|
||||
|
||||
`MarkerEditor` lets us provide information about the marker by overriding the [GetMarkerOptions](xref:UnityEditor.Timeline.MarkerEditor#UnityEditor_Timeline_MarkerEditor_GetMarkerOptions_UnityEngine_Timeline_IMarker_) method.
|
||||
|
||||
``` c#
|
||||
public override MarkerDrawOptions GetMarkerOptions(IMarker marker)
|
||||
{
|
||||
var annotation = marker as AnnotationMarker;
|
||||
if (annotation != null)
|
||||
{
|
||||
return new MarkerDrawOptions { tooltip = annotation.title };
|
||||
}
|
||||
return base.GetMarkerOptions(marker);
|
||||
}
|
||||
```
|
||||
|
||||
Here the tooltip of an `Annotation` has been set to use the annotation's `title` variable.
|
||||
|
||||

|
||||
|
||||
[MarkerDrawOptions](xref:UnityEditor.Timeline.MarkerDrawOptions) can also set the error text on a marker, which can be useful if a variable has been incorrectly set and needs attention.
|
||||
|
||||
#### Overlay
|
||||
|
||||
An overlay can be drawn on top of a marker by overriding the [DrawOverlay](xref:UnityEditor.Timeline.MarkerEditor#UnityEditor_Timeline_MarkerEditor_DrawOverlay_UnityEngine_Timeline_IMarker_UnityEditor_Timeline_MarkerUIStates_UnityEditor_Timeline_MarkerOverlayRegion_) method:
|
||||
|
||||
``` c#
|
||||
public override void DrawOverlay(IMarker marker, MarkerUIStates uiState, MarkerOverlayRegion region)
|
||||
{
|
||||
var annotation = marker as AnnotationMarker;
|
||||
if (annotation != null)
|
||||
{
|
||||
//Draw overlay code...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
An overlay is drawn on top of the marker; the [USS style](uss_styles.md) is drawn first and `DrawOverlay` is called afterwards. For an `Annotation`, we can use `DrawOverlay` to change the color of the marker and to draw a line that spans the full Timeline window's height. To do this, we can use the information given in `region`. Along with the visible time range, [MarkerOverlayRegion](xref:UnityEditor.Timeline.MarkerOverlayRegion) provides two rectangles that can be used to know where to draw:
|
||||
|
||||
* `markerRegion`
|
||||
|
||||
`markerRegion` is the rectangle that encompasses the marker. This is useful to draw something directly on the marker itself. For `Annotation`, this rectangle is used to draw the color overlay.
|
||||
|
||||

|
||||
|
||||
* `timelineRegion`
|
||||
|
||||
`timelineRegion` is the rectangle that encompasses the clips and markers region of the timeline window. This is useful to draw something out of the marker's region, like the `Annotation`'s line overlay.
|
||||
|
||||

|
||||
|
||||
``` c#
|
||||
const float k_LineOverlayWidth = 6.0f;
|
||||
float markerRegionCenter = markerRegion.xMin + (markerRegion.width - k_LineOverlayWidth) / 2.0f;
|
||||
Rect lineRect = new Rect(markerRegionCenter,
|
||||
timelineRegion.y,
|
||||
k_LineOverlayWidth,
|
||||
timelineRegion.height);
|
||||
```
|
||||
|
||||
## 3. Create custom Actions
|
||||
|
||||
### Timeline Action
|
||||
|
||||
Actions can be used to add new menu entries in Timeline's context menus. For an Annotation, we want to add a menu item available in all context menus to create an `Annotation` with the clipboard's contents. To do this, a [TimelineAction](xref:UnityEditor.Timeline.Actions.TimelineAction) is needed, along with the [MenuEntry attribute](xref:UnityEditor.Timeline.Actions.MenuEntryAttribute).
|
||||
|
||||
``` c#
|
||||
[MenuEntry("Create Annotation from clipboard contents")]
|
||||
public class CreateAnnotationFromClipboardContents : TimelineAction
|
||||
{
|
||||
//...
|
||||
}
|
||||
```
|
||||
|
||||
`MenuEntry` lets Timeline know that this action can be added in context menus. Classes inheriting from `TimelineAction` need to override two methods: `Execute` and `Validate`.
|
||||
|
||||
#### Validate
|
||||
|
||||
`Validate` is used to specify that the action's prerequisites are fulfilled. In the case of `CreateAnnotationFromClipboardContents`, the action is only valid if there actually is contents in the clipboard. `ActionValidity` is used to describe the validity state of an action:
|
||||
|
||||
``` c#
|
||||
public override ActionValidity Validate(ActionContext context)
|
||||
{
|
||||
if (!markers.All(marker => marker is AnnotationMarker))
|
||||
return ActionValidity.NotApplicable;
|
||||
|
||||
string buffer = EditorGUIUtility.systemCopyBuffer;
|
||||
return buffer.Length == 0 ? ActionValidity.Invalid : ActionValidity.Valid;
|
||||
}
|
||||
```
|
||||
|
||||
* `ActionValidity.Valid` : The action can be executed.
|
||||
* `ActionValidity.Invalid` : The action cannot be executed given the current context and will appear grayed out in context menus.
|
||||
* `ActionValidity.NotApplicable` : The action does not apply to the current context and will not show up in menus.
|
||||
|
||||
#### Execute
|
||||
|
||||
`Execute` should run the code necessary to execute the action's purpose.
|
||||
|
||||
``` c#
|
||||
public override bool Execute(ActionContext context)
|
||||
{
|
||||
string buffer = EditorGUIUtility.systemCopyBuffer;
|
||||
TrackAsset track = context.tracks.FirstOrDefault();
|
||||
|
||||
if (buffer.Length != 0)
|
||||
{
|
||||
// Create the new annotation and add it to the track
|
||||
//...
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
```
|
||||
|
||||
The return value should specify if the execution succeeded or not.
|
||||
|
||||
### Marker Action
|
||||
|
||||
It is also possible to write custom actions that apply only to markers, instead of all Timeline items. This is the purpose of the `MarkerEditor` class. It works just like `TimelineAction`, except that action applies to a list of markers.
|
||||
|
||||
A shortcut can also be assigned to an action. A static method with the `TimelineShortcut` attribute is needed. `Invoker` can be used to easily execute a given action:
|
||||
|
||||
``` c#
|
||||
[TimelineShortcut("Replace annotation description with clipboard", KeyCode.G)]
|
||||
public static void InvokeAction()
|
||||
{
|
||||
Invoker.InvokeWithSelectedMarkers<ReplaceAnnotationDescriptionAction>();
|
||||
}
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
## Runtime considerations
|
||||
|
||||
`AnnotationMarker` is available at runtime; it can be queried using, for example, `TrackAsset.GetMarkers()`. However, `AnnotationMarkerEditor` and custom actions are not available at runtime, since it depends on classes that are not part of the runtime assembly.
|
@ -0,0 +1,14 @@
|
||||
# Text Track sample
|
||||
|
||||
_This track requires the TextMeshPro package to be installed in the project._
|
||||
|
||||
This type of track can be used to display different messages to the screen using a TextMeshPro Text Component. It is ideal for things like subtitles. It demonstrates the following:
|
||||
|
||||
* Registering custom previewable properties in a custom track.
|
||||
* Perform custom blending of clips using a mixer PlayableBehaviour.
|
||||
* Provide custom clip data that can be animated using the inline curve editor using a PlayableBehaviour template.
|
||||
* Using a ClipEditor to react to changes in a clip.
|
||||
|
||||
## Usage
|
||||
|
||||
To use this custom track, drag a TextMeshPro Text Component into the hierarchy view of the Timeline. A TextTrack will be created, and use the track context menu to create clips. Clip properties such as Message, FontSize and Color can be modified in the inspector by selecting the clip. Clips can be overlapped to create transitions.
|
@ -0,0 +1,12 @@
|
||||
# Time Dilation Track sample
|
||||
|
||||
This type of track can be used to adjust Unity's global `Time.timeScale` for the duration of the clip. The most common use would be to create bullet-time style effects. The sample demonstrates the following:
|
||||
|
||||
* Creating a custom TrackMixer PlayableBehaviour that performs custom blending of clip values.
|
||||
* Setting and restoring Unity global values in a PlayableBehaviour.
|
||||
* How to support blending and extrapolation on custom clips.
|
||||
* Provide custom clip data that can be animated using the inline curve editor using a PlayableBehaviour template.
|
||||
|
||||
## Usage
|
||||
|
||||
Create a TimeDilationTrack in timeline using the Add Track menu, found under the Timeline.Samples submenu. Add clips to the track, and use the inspector to set scale values for the clip, or use the inline curve editor to animate the scale values. Clips can also be overlapped to create transitions between clips.
|
@ -0,0 +1,222 @@
|
||||
# Transform Tween track sample
|
||||
|
||||

|
||||
|
||||
This track can be used for simple transform movements between two points.
|
||||
|
||||
## Usage
|
||||
|
||||
This track can be used for simple transform movements. All translation happens in a straight line but the speed can be controlled with an animation curve. The Tween track binds to the scene `Transform` you wish to move.
|
||||
|
||||
Field | Description
|
||||
---- | ---
|
||||
Start Location | This is a reference to a Transform in the scene that marks the position and/or rotation of the moving Transform when the playable starts. If it is left null the position/rotation of the moving Transform when the playable starts will be used.|
|
||||
End Location | This is a reference to a Transform in the scene that marks the position and/or rotation of the moving Transform when the playable finishes.
|
||||
Tween Position | Whether or not the position of the Transform should change.
|
||||
Tween Rotation | Whether or not the rotation of the Transform should change.
|
||||
|
||||
## Custom clip workflow example
|
||||
|
||||
This example will demonstrate how to:
|
||||
|
||||
* create a custom clip, track and mixer;
|
||||
* use the PlayableGraph API to animate an object's transform;
|
||||
* customize a clip with `ClipEditor`;
|
||||
|
||||
### 1. Custom clip
|
||||
|
||||
when a Timeline begins playing, nodes called `Playable`s are created. They are organized in a tree-like structure called the `PlayableGraph`. For each frame, Timeline samples this graph to read and mix multiple data sources (animation, audio and more).
|
||||
|
||||
The first step to create a custom clip is to define a new `PlayableBehaviour` that will be added to a graph. It will need to store the data needed to implement the transform tween:
|
||||
|
||||
``` c#
|
||||
public class TweenBehaviour : PlayableBehaviour
|
||||
{
|
||||
public Transform startLocation;
|
||||
public Transform endLocation;
|
||||
|
||||
public bool shouldTweenPosition;
|
||||
public bool shouldTweenRotation;
|
||||
|
||||
public AnimationCurve curve;
|
||||
}
|
||||
```
|
||||
|
||||
The `PlayableBehaviour`'s data is not serialized and will be lost once its parent graph is destroyed. To save this data, the next step is to define a new `PlayableAsset`:
|
||||
|
||||
``` c#
|
||||
[Serializable]
|
||||
public class TweenClip : PlayableAsset
|
||||
{
|
||||
public ExposedReference<Transform> startLocation;
|
||||
public ExposedReference<Transform> endLocation;
|
||||
|
||||
public bool shouldTweenPosition = true;
|
||||
public bool shouldTweenRotation = true;
|
||||
|
||||
public AnimationCurve curve;
|
||||
//...
|
||||
}
|
||||
```
|
||||
|
||||
_Note:_ The clip needs to store a start and an end location. Since an asset cannot directly reference a scene object, it cannot store a transform object directly. This is why an `ExposedReference<Transform>` is used.
|
||||
|
||||
A `PlayableAsset`'s main purpose is to build a `PlayableBehaviour`. This is done with the `CreatePlayable` method:
|
||||
|
||||
``` c#
|
||||
public class TweenClip : PlayableAsset
|
||||
{
|
||||
//...
|
||||
|
||||
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
|
||||
{
|
||||
// create a new TweenBehaviour
|
||||
ScriptPlayable<TweenBehaviour> playable = ScriptPlayable<TweenBehaviour>.Create(graph);
|
||||
TweenBehaviour tween = playable.GetBehaviour();
|
||||
|
||||
// set the behaviour's data
|
||||
tween.startLocation = startLocation.Resolve(graph.GetResolver());
|
||||
tween.endLocation = endLocation.Resolve(graph.GetResolver());
|
||||
tween.curve = curve;
|
||||
tween.shouldTweenPosition = shouldTweenPosition;
|
||||
tween.shouldTweenRotation = shouldTweenRotation;
|
||||
|
||||
return playable;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`CreatePlayable` will initialize a new `TweenBehaviour` using `TweenClip`'s data.
|
||||
|
||||
### 2. Custom track
|
||||
|
||||
A custom track is created by defining a [TrackAsset](xref:UnityEngine.Timeline.TrackAsset) subclass. The following attributes can be added to a `TrackAsset`:
|
||||
|
||||
* [TrackBindingType](xref:UnityEngine.Timeline.TrackBindingTypeAttribute): defines which type of object should be bound to a track;
|
||||
* [TrackClipType](xref:UnityEngine.Timeline.TrackClipTypeAttribute): defines which type of clip should be associated to a track.
|
||||
|
||||
For this example, the track needs a `Transform` object binding and can only accepts clips of type `TweenClip`, which was previously defined in step 1:
|
||||
|
||||
``` c#
|
||||
[TrackBindingType(typeof(Transform))]
|
||||
[TrackClipType(typeof(TweenClip))]
|
||||
public class TweenTrack : TrackAsset
|
||||
{
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
The data setup is complete; `TweenTrack` and `TweenClip` can now be added to a timeline:
|
||||
|
||||

|
||||
|
||||
However, no transform tween has been implemented yet. To do this, a track mixer is needed.
|
||||
|
||||
### 3. Define a track mixer
|
||||
|
||||
To properly handle blending, or crossfading, between two clips, a track mixer is needed. A track mixer is a `PlayableBehaviour` that will have access to all clips data and will blend those together.
|
||||
|
||||
#### Track mixer setup
|
||||
|
||||
By default, when a track is added to a timeline, an empty playable is generated and is connected to each clip's playable.
|
||||
|
||||
For example, this track:
|
||||
|
||||

|
||||
|
||||
will generate the following playable graph:
|
||||
|
||||

|
||||
|
||||
* `Timeline`: this playable is the `root` playable; all playables related to tracks are connected to this node.
|
||||
* `Playable`: this playable represents the track mixer. Since no track mixer is defined, an empty one is generated.
|
||||
* `TweenBehaviour`: this playable represents a clip. One per clip is generated. All clip playables are connected to the track mixer.
|
||||
|
||||
In order to define a custom track mixer, a new `PlayableBehaviour` needs to be defined:
|
||||
|
||||
``` c#
|
||||
public class TweenMixerBehaviour : PlayableBehaviour {}
|
||||
```
|
||||
|
||||
then, in `TrackAsset`, the [CreateTrackMixer](xref:UnityEngine.Timeline.TrackAsset#UnityEngine_Timeline_TrackAsset_CreateTrackMixer_UnityEngine_Playables_PlayableGraph_UnityEngine_GameObject_System_Int32_) method can be used to specify a custom track mixer:
|
||||
|
||||
``` c#
|
||||
public class TweenTrack : TrackAsset
|
||||
{
|
||||
public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
|
||||
{
|
||||
return ScriptPlayable<TweenMixerBehaviour>.Create(graph, inputCount);
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Now the playable graph looks like this:
|
||||
|
||||

|
||||
|
||||
The empty playable that used to connect clip playables together is now replaced by `TweenMixerBehaviour`.
|
||||
|
||||
#### Transform tween implementation
|
||||
|
||||
The implementation of the transform tween resides in the `ProcessFrame` method from `TweenMixerBehaviour`. Here are the main steps of that implementation:
|
||||
|
||||
* _Initialization_: When the timeline is first played, the initial transform of the track binding is fetched. If the start or end transform is `null`, the initial transform will be used instead.
|
||||
* _Get clip behaviours & weights_: to appropriately blend, the mixer needs to ask information for all of its inputs (clips):
|
||||
|
||||
``` c#
|
||||
// Iterate on all the playable's (mixer) inputs (ie each clip on the track)
|
||||
int inputCount = playable.GetInputCount();
|
||||
for (int i = 0; i < inputCount; i++)
|
||||
{
|
||||
// get the input connected to the mixer
|
||||
Playable input = playable.GetInput(i);
|
||||
|
||||
// get the weight of the connection
|
||||
float inputWeight = playable.GetInputWeight(i);
|
||||
|
||||
// get the clip's behaviour
|
||||
TweenBehaviour tweenInput = GetTweenBehaviour(input);
|
||||
}
|
||||
```
|
||||
|
||||
* _Calculate and blend_: A linear interpolation is used to calculate a transform between two points.
|
||||
* _Apply result_: Once the calculation is done, the transform is written in the track binding object:
|
||||
|
||||
``` c#
|
||||
// Apply the final position and rotation values in the track binding
|
||||
trackBinding.position = accumPosition + m_InitialPosition * (1.0f - totalPositionWeight);
|
||||
trackBinding.rotation = accumRotation.Blend(m_InitialRotation, 1.0f - totalRotationWeight);
|
||||
|
||||
```
|
||||
|
||||
### 4. Customize a clip's appearance
|
||||
|
||||
`ClipEditor` can be used to augment the capabilities of a clip in the editor. It works like a custom [Inspector](https://docs.unity3d.com/ScriptReference/CustomEditor.html); the [CustomTimelineEditor attribute](xref:UnityEditor.Timeline.CustomTimelineEditorAttribute) is used to tell Timeline that a [ClipEditor](xref:UnityEditor.Timeline.ClipEditor) class should be associated to a given clip.
|
||||
|
||||
``` c#
|
||||
[CustomTimelineEditor(typeof(TweenClip))]
|
||||
public class TweenClipEditor : ClipEditor
|
||||
{
|
||||
//...
|
||||
}
|
||||
```
|
||||
|
||||
It is possible to customize the appearance of a clip with the [DrawBackground](xref:UnityEditor.Timeline.ClipEditor#UnityEditor_Timeline_ClipEditor_DrawBackground_UnityEngine_Timeline_TimelineClip_UnityEditor_Timeline_ClipBackgroundRegion_) method:
|
||||
|
||||
``` c#
|
||||
public override void DrawBackground(TimelineClip clip, ClipBackgroundRegion region)
|
||||
{
|
||||
TweenClip asset = clip.asset as TweenClip;
|
||||
|
||||
if (asset == null)
|
||||
return;
|
||||
|
||||
// Drawing code here...
|
||||
}
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
* Only the portion between (0,1) of the curve will be used.
|
||||
* When a clip ends, the object bound to the track will return to its original position.
|
@ -0,0 +1,21 @@
|
||||
# VideoTrack sample
|
||||
|
||||
The Video Track sample provides a track capable of playing video clips in Timeline. It demonstrates how to do the following:
|
||||
|
||||
* Using built-in blending, speed and clip-in capabilities in custom clips.
|
||||
* Using `ClipEditor`s to customize clip drawing.
|
||||
* Using a mixer PlayableBehaviour to perform look-ahead operations.
|
||||
* Managing `UnityEngine.Object` lifetime (`VideoPlayer`) with a `PlayableBehaviour`.
|
||||
* Using ExposedReferences to reference components in the scene from a `PlayableAsset`.
|
||||
|
||||
## Usage
|
||||
|
||||
Drag and drop an imported video from the project window onto a timeline. The video track and clip will be created. The video clip has several playback options, including the option to specify the camera to render to video to, and an audio source to redirect the audio.
|
||||
|
||||
If no camera is specified, the main camera in the scene will be used. If no audio source is specified, the audio will play directly (i.e. no 3D audio).
|
||||
|
||||
## Known Issues
|
||||
|
||||
* The video track supports ease-in and ease-out of a video, but blending between videos will not give expected results.
|
||||
* Editing a timeline containing video clips may cause the clip to flicker or change unexpectedly.
|
||||
* Looping a timeline with video clips may cause the video to be de-synchronized.
|
@ -0,0 +1,50 @@
|
||||
# Timeline overview
|
||||
|
||||
Use the **Timeline window** to create cut-scenes, cinematics, and game-play sequences by visually arranging tracks and clips linked to GameObjects in your Scene.
|
||||
|
||||

|
||||
|
||||
_A cinematic sequence in the Timeline window._
|
||||
|
||||
For each cut-scene, cinematic, or game-play sequence, the Timeline window saves the following:
|
||||
|
||||
* **Timeline Asset**: Stores the tracks, clips, and recorded animations without links to the specific GameObjects being animated. The Timeline Asset is saved to the Project.
|
||||
* **Timeline instance**: Stores links to the specific GameObjects being animated or affected by the Timeline Asset. These links, referred to as **bindings**, are saved to the Scene.
|
||||
|
||||
## Timeline Asset
|
||||
|
||||
The Timeline window saves track and clip definitions as a **Timeline Asset**. If you record key animations while creating your cinematic, cut-scene, or game-play sequence, the Timeline window saves the recorded clips as children of the Timeline Asset.
|
||||
|
||||

|
||||
|
||||
_The Timeline Asset saves tracks and clips (red). Timeline saves recorded clips (blue) as children of the Timeline Asset._
|
||||
|
||||
## Timeline instance
|
||||
|
||||
To animate a GameObject in your Scene with a Timeline Asset, you must create a **Timeline instance**. A **Timeline instance** associates a Timeline Asset with the GameObject in the Scene, through a [Playable Director](play_director.md) component.
|
||||
|
||||
When you select a GameObject in a Scene that has a Playable Director component, the Timeline instance appears in the Timeline window. The bindings appear in the Timeline window and in the Playable Director component (Inspector window).
|
||||
|
||||

|
||||
|
||||
_The Playable Director component shows the Timeline Asset (blue) with its bound GameObjects (red). The Timeline window shows the same bindings (red) in the Track list._
|
||||
|
||||
The Timeline window provides an automated method of creating a Timeline instance while [creating a Timeline Asset](wf_instance.md).
|
||||
|
||||
## Reusing Timeline Assets
|
||||
|
||||
Because Timeline Assets and Timeline instances are separate, you can reuse the same Timeline Asset with many Timeline instances.
|
||||
|
||||
For example, you could create a Timeline Asset named VictoryTL with the animation, music, and particle effects that play when the main game character (Player) wins. To reuse the VictoryTL Timeline Asset to animate another game character (Enemy) in the same Scene, you can create another Timeline instance for the secondary game character.
|
||||
|
||||

|
||||
|
||||
_The Player GameObject (red) is attached to the VictoryTL Timeline Asset]_
|
||||
|
||||

|
||||
|
||||
_The Enemy GameObject (blue) is also attached to the VictoryTL Timeline Asset]_
|
||||
|
||||
Because you are reusing the Timeline Asset, any modification to the Timeline Asset in the Timeline window results in changes to all Timeline instances.
|
||||
|
||||
For example, in the previous example, if you delete the Audio track while modifying the Player Timeline instance, the Timeline window removes the track from the VictoryTL Timeline Asset. The Timeline window also removes the Audio track from all instances of the VictoryTL Timeline Asset, including the Enemy Timeline instance.
|
@ -0,0 +1,71 @@
|
||||
# Timeline glossary
|
||||
|
||||
This topic provides an alphabetical list of the terminology used throughout the Timeline documentation.
|
||||
|
||||
**animatable property**: A property belonging to a GameObject, or belonging to a component added to a GameObject, that can have different values over time.
|
||||
|
||||
**animation**: The result of adding two different keys, at two different times, for the same animatable property.
|
||||
|
||||
**animation curve**: The curve drawn between keys set for the same animatable property, at different frames or seconds. The position of the tangents and the selected interpolation mode for each key determines the shape of the animation curve.
|
||||
|
||||
**binding** or **Track binding**: Refers to the link between Timeline Asset tracks and the GameObjects in the scene. When you link a GameObject to a track, the track animates the GameObject. Bindings are stored as part of the Timeline instance.
|
||||
|
||||
**blend** and **blend area**: The 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.
|
||||
|
||||
**Blend In curve**: In a blend between two Animation clips, Audio clips, or Control clips, there are two blend curves. The blend curve for the incoming clip is referred to as the **Blend In** curve.
|
||||
|
||||
**Blend Out curve**: In 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.
|
||||
|
||||
**clip**: A generic term that refers to any clip within the Clips view of the Timeline window.
|
||||
|
||||
**Clips view**: The area in the Timeline window where you add, position, and manipulate clips.
|
||||
|
||||
**Control/Command**: This term is used when instructing the user to press or hold down the Control key on Windows, or the Command key on Mac.
|
||||
|
||||
**Curves view**: The area in the Timeline window that shows the animation curves for Infinite clips or for Animation clips that have been converted from Infinite clips. The Curves view is similar to [Curves mode](animeditor-AnimationCurves) in the Animation window.
|
||||
|
||||
**Gap extrapolation**: How an Animation track approximates animation data in the gaps before and after an Animation clip.
|
||||
|
||||
**field**: A generic term that describes an editable box that the user clicks and types-in a value. A field is also referred to as a **property**.
|
||||
|
||||
**incoming clip:** The second clip in a blend between two clips. The first clip, the out-going clip, transitions to the second clip, the **incoming clip**.
|
||||
|
||||
**Infinite clip**: A special animation clip that contains basic key animation recorded directly to an Animation track within the Timeline window. An Infinite clip cannot be positioned, trimmed, or split because it does not have a defined duration: it spans the entirety of an Animation track.
|
||||
|
||||
**interpolation**: The estimation of values that determine the shape of an animation curve between two keys.
|
||||
|
||||
**interpolation mode**: The interpolation algorithm that draws the animation curve between two keys. The interpolation mode also joins or breaks left and right tangents.
|
||||
|
||||
**key**: The value of an animatable property, set at a specific point in time. Setting at least two keys for the same property creates an animation.
|
||||
|
||||
**out-going clip**: The first clip in a blend between two clips. The first clip, the **out-going clip**, transitions to the second clip, the incoming clip.
|
||||
|
||||
**Playhead Location field**: The field that expresses the location of the Timeline Playhead in either frames or seconds, depending on the Timeline Settings.
|
||||
|
||||
**property**: A generic term for the editable fields, buttons, checkboxes, or menus that comprise a component. An editable field is also referred to as a **field**.
|
||||
|
||||
**tangent**: One of two handles that controls the shape of the animation curve before and after a key. Tangents appear when a key is selected in the Curves view, or when a key is selected in the Curve Editor.
|
||||
|
||||
**tangent mode**: The selected interpolation mode used by the left tangent, right tangent, or both tangents.
|
||||
|
||||
**Timeline** or **Unity's Timeline**: Generic terms that refer to all features, windows, editors, and components related to creating, modifying, or reusing cut-scenes, cinematics, and game-play sequences.
|
||||
|
||||
**Timeline Asset**: Refers to the tracks, clips, and recorded animation that comprise a cinematic, cut-scene, game-play sequence, or other effect created with the Timeline 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.
|
||||
|
||||
**Timeline window**: The official name of the window where you create, modify, and preview a Timeline instance. Modifications to a Timeline instance also affects the Timeline Asset.
|
||||
|
||||
**Timeline instance**: Refers to the link between a Timeline Asset and the GameObjects that the Timeline Asset animates in the scene. You create a Timeline instance by associating a Timeline Asset to a GameObject through a Playable Director component. The Timeline instance is scene-based.
|
||||
|
||||
**Timeline Playback Controls**: The row of buttons and fields in the Timeline window that controls playback of the Timeline instance. The Timeline Playback Controls affect the location of the Timeline Playhead.
|
||||
|
||||
**Timeline Playback mode**: The mode that previews the Timeline instance in the Timeline window. Timeline Playback mode is a simulation of Play mode. Timeline Playback mode does not support audio playback.
|
||||
|
||||
**Timeline Playhead**: The white marker and line that indicates the exact point in time being previewed in the Timeline window.
|
||||
|
||||
**Timeline Selector**: The name of the menu in the Timeline window that selects the Timeline instance to be previewed or modified.
|
||||
|
||||
**track**: A generic term that refers to any track within the Track list of the Timeline window.
|
||||
|
||||
**Track groups**: The term for a series of tracks organized in an expandable and collapse collection of tracks.
|
||||
|
||||
**Track list**: The area in the Timeline window where you add, group, and modify tracks.
|
@ -0,0 +1,101 @@
|
||||
# Timeline Playback Controls
|
||||
|
||||
To play the Timeline instance and to control the location of the Timeline Playhead, use the Timeline Playback Controls.
|
||||
|
||||

|
||||
|
||||
_Timeline Playback Controls_
|
||||
|
||||
## Timeline Start button
|
||||
|
||||

|
||||
|
||||
To move the Timeline Playhead to the start of the Timeline instance, click the Timeline Start button, or hold Shift and press Comma (,).
|
||||
|
||||
## Previous Frame button
|
||||
|
||||

|
||||
|
||||
To move the Timeline Playhead to the previous frame, click the Previous Frame button, or press Comma (,).
|
||||
|
||||
<a name="playbutton"></a>
|
||||
## Timeline Play button
|
||||
|
||||

|
||||
|
||||
To preview the Timeline instance in Timeline Playback mode, click the Timeline Play button, or press the Spacebar. Timeline Playback mode does the following:
|
||||
|
||||
* Begins playback at the current location of the Timeline Playhead and continues to the end of the Timeline instance. If the Play Range button is enabled, playback is restricted to a specified time range.
|
||||
* The Timeline Playhead position moves along the Timeline instance. The Playhead Location field shows the position of the Timeline Playhead in either frames, timecode or seconds, depending on the [Timeline settings](tl_settings.md).
|
||||
* To pause playback, click the Timeline Play button again, or press the Spacebar.
|
||||
* When playback reaches the end of the Timeline instance, the Wrap Mode determines whether playback should hold, repeat, or do nothing. The Wrap Mode setting is a [Playable Director component](play_director.md) property.
|
||||
|
||||
Timeline Playback mode provides a preview of the Timeline instance while in the Timeline window. Timeline Playback mode is only a simulation of [Play Mode in the Game View](https://docs.unity3d.com/Manual/GameView.html).
|
||||
|
||||
The Timeline Playback mode does not support audio playback. To preview a Timeline instance with audio, enable the Play on Awake option in the [Playable Director component](play_director.md) and preview game play in Play Mode.
|
||||
|
||||
## Next Frame button
|
||||
|
||||

|
||||
|
||||
To move the Timeline Playhead to the next frame, click the Next Frame button, or press Period (.).
|
||||
|
||||
## Timeline End button
|
||||
|
||||

|
||||
|
||||
To move the Timeline Playhead to the end of the Timeline instance, click the Timeline End button, or hold Shift and press Period (.).
|
||||
|
||||
<a name="playrange"></a>
|
||||
## Play Range button
|
||||
|
||||

|
||||
|
||||
Enable the **Play Range** button to restrict playback to a specific range of seconds or frames. You can only set a play range when previewing a Timeline instance within the Timeline window. Unity ignores the play range in [Play Mode](https://docs.unity3d.com/Manual/GameView.html).
|
||||
|
||||
The Timeline ruler highlights the play range and indicates its start and end with white markers. To modify the play range, drag either marker.
|
||||
|
||||

|
||||
|
||||
_Play Range (red circle) enabled with while markers and highlighted area defining range_
|
||||
|
||||
<a name="playheadlocation"></a>
|
||||
## Timeline Playhead and Playhead Location field
|
||||
|
||||
The Timeline Playhead indicates the exact point in time being previewed in the Timeline window. The Playhead Location field expresses the location of the Timeline Playhead in either frames or seconds.
|
||||
|
||||

|
||||
|
||||
_Playhead Location field and Timeline Playhead (red). The Timeline Playhead also appears on the Zoombar (red arrow)._
|
||||
|
||||
Use the [Zoombar to navigate, scroll, and zoom](clp_pan_zoom.md) the Clips view. A white line indicates the location of the Timeline Playhead in relation to the entire Timeline instance.
|
||||
|
||||
To jump the Timeline Playhead to a specific time, click the Timeline ruler. You can also enter the time value in the Playhead Location field and press Enter. When entering a value, frames are converted to seconds or seconds are converted to frames, based on the Timeline settings. For example, if the Timeline ruler is expressed as seconds with a frame rate of 30 frames per second, entering 180 in the Playhead Location field converts 180 frames to seconds and moves the Timeline Playhead to 6:00. To set the time format that the Timeline window uses, configure the [Timeline Settings](tl_settings.md).
|
||||
|
||||
## Switching between Local and Global
|
||||
|
||||
Use the Local or Global button to change the Timeline ruler from local time to global time. Local time and global time are only relevant when editing a nested Timeline instance.
|
||||
|
||||
[To create a nested Timeline instance](wf_nested.md), drag a GameObject associated with a Timeline instance into another Timeline instance. The Timeline instance you are dragging into becomes the master Timeline instance. The Timeline instance associated with the GameObject becomes a nested Timeline instance.
|
||||
|
||||

|
||||
|
||||
_A nested Timeline instance appears as a Control clip on a Control track (red arrow)_
|
||||
|
||||
To edit a nested Timeline instance, double-click the Control clip that contains the nested Timeline instance. The Timeline window switches to the nested Timeline instance, indicated by the Timeline title which shows the name and GameObject of the master Timeline instance, followed by the name and GameObject of the nested Timeline instance.
|
||||
|
||||

|
||||
|
||||
_The Timeline title indicates that you are editing a nested Timeline instance (red outline). The Global button (red arrow) indicates that the nested Timeline instance is shown using global time._
|
||||
|
||||
When editing a nested Timeline instance, click **Global** to switch the Timeline ruler to Local time. Local time is relative to the nested Timeline. This means that the Timeline ruler starts at zero.
|
||||
|
||||

|
||||
|
||||
_A nested Timeline instance in Local time._
|
||||
|
||||
Click **Local** to view the Timeline ruler in relation to the placement of the nested Timeline in the master Timeline instance. This means that if, for example, if the Control clip is placed at frame 70 of the master Timeline then the Timeline ruler starts at 70 at the beginning of the nested Timeline instance.
|
||||
|
||||

|
||||
|
||||
_A nested Timeline instance in Global time._
|
@ -0,0 +1,11 @@
|
||||
# Timeline Preview and Timeline Selector
|
||||
|
||||
Use the Timeline Selector to select the Timeline instance to view, modify, or preview in the Timeline window. The Timeline **Preview** button enables or disables previewing the effect that the selected Timeline instance has on your Scene.
|
||||
|
||||

|
||||
|
||||
_Timeline **Preview** button with Timeline Selector and menu. Selecting a Timeline instance automatically enables the Timeline Preview button._
|
||||
|
||||
To select a Timeline instance, click the Timeline Selector and choose from the list of Timeline instances in the current Scene.
|
||||
|
||||
Each menu item displays the name of the Timeline Asset and its associated GameObject in the current Scene. For example, the Timeline Asset named GroundATL that is associated with the Ground GameObject, displays as "GroundATL (Ground)."
|
@ -0,0 +1,62 @@
|
||||
# Timeline Settings
|
||||
|
||||
Use the Timeline Settings to choose the Timeline window and Timeline Asset settings such as the unit of measurement, the duration mode, audio waveform, and window snap settings.
|
||||
|
||||

|
||||
|
||||
_Click the Cog icon in the Timeline window to view the Timeline Settings menu_
|
||||
|
||||
## Time Unit
|
||||
|
||||
Select either **Frames**, **Timecode** or **Seconds** to set the Timeline window to display time in that format. Timecode will display the time in seconds with sub-second values displayed in frames.
|
||||
|
||||
## Duration Mode
|
||||
|
||||
Use the **Duration Mode** to set whether the duration of the Timeline Asset extends to the end of the last clip (**Based On Clips**), or ends at a specific time or frame (**Fixed Length**). When the **Duration Mode** is set to **Fixed Length**, use one of the following methods to change the length of the Timeline Asset:
|
||||
|
||||
* Select the Timeline Asset in the Project window and use the Inspector window to set the Duration in seconds or frames.
|
||||
* In the Timeline window, drag the blue marker on the timeline. The blue marker indicates the end of the Timeline Asset. A blue line indicates the duration of the Timeline Asset.
|
||||
|
||||

|
||||
|
||||
_Timeline Asset duration (red rectangle) and end marker (green circle)_
|
||||
|
||||
## Frame Rate
|
||||
|
||||
Select one of the options under **Frame Rate** to set the unit of measurement for the Timeline ruler. Change the Frame Rate to align clips at precise frames but changing the Frame Rate is only visual and has no effect on play speed, keys, tracks, or clips. The following standard frame rates are listed: Film (24 fps), PAL (25 fps), NTSC (29.97 fps), 30, 50, or 60.
|
||||
|
||||
Timeline supports custom frame rates from 1e-6 to 1000. To set a custom frame rate, you must use the **Frame Rate** property in the [Timeline Asset settings](insp_tl.md). When the Timeline Asset is set to a custom frame rate, the Custom menu item is enabled and is automatically selected for the Timeline instance. The Custom menu item shows the custom frame rate in parentheses.
|
||||
|
||||
## Show Audio Waveforms
|
||||
|
||||
Enable **Show Audio Waveforms** to draw the waveforms for all audio clips on all audio tracks. For example, use an audio waveform as a guide when manually positioning an Audio clip of footsteps with the Animation clip of a humanoid walking. Disable **Show Audio Waveform** to hide audio waveforms. **Show Audio Waveforms** is enabled by default.
|
||||
|
||||
## Enable Audio Scrubbing
|
||||
|
||||
**Enable Audio Scrubbing** to play audio while dragging the Timeline Playhead.
|
||||
|
||||
Disable **Enable Audio Scrubbing** to stop playing audio while dragging the Timeline Playhead. When disabled, Timeline only plays audio when in [Timeline Playback mode](tl_play_cntrls.md#playbutton).
|
||||
|
||||
## Snap to Frame
|
||||
|
||||
Enable **Snap to Frame** to manipulate clips, preview Timeline instances, drag the Timeline Playhead, and position the Timeline Playhead using frames. Disable **Snap to Frame** to use subframes. **Snap to Frame** is enabled by default.
|
||||
|
||||

|
||||
|
||||
_Disable **Snap to Frame** to position clips and drag the playhead between frames_
|
||||
|
||||
For example, when **Snap to Frame** is disabled and you drag the Timeline Playhead, it moves the playhead between frames. The format of [Playhead Location](tl_play_cntrls.md#playheadlocation) displays differently depending on whether the Timeline window is set to **Seconds**, **Timecode** or **Frames**:
|
||||
|
||||
* When the Timeline window is set to **Frames**, the Playhead Location shows frames and subframes. For example, 8 frames and 34 subframes displays as 8.34.
|
||||
* When the Timeline window is set to **Timecode**, the Playhead Location shows seconds, frames, and subframes. For example, 6 seconds, 17 frames, and 59 subframes displays as 6:17 [.59].
|
||||
* When the Timeline window is set to **Seconds**, the Playhead Location shows seconds. For example, 6.5 seconds displays as 6:50.
|
||||
|
||||
Manipulating clips, previewing Timeline instances, and positioning the playhead at the subframes level is useful when attempting to synchronize animation and effects with audio. Many high-end audio processing software products create audio waveforms with subframe accuracy.
|
||||
|
||||
## Edge Snap
|
||||
|
||||
Enable the **Edge Snap** option to snap clips when you position, trim, and create blends.
|
||||
|
||||
When enabled, the Timeline window snaps the start or end of a clip when dragged within 10 pixels of the Timeline Playhead, the start or end of a clip on the same track, the start or end of a clip on another track, or the start or end of the entire Timeline instance. The start guide or end guide is redrawn in white to indicate that the clip has snapped to the edge of another clip or the Timeline Playhead.
|
||||
|
||||
Disable **Edge Snap** to create more accurate blends, ease-ins, or ease-outs. **Edge Snap** is enabled by default.
|
@ -0,0 +1,29 @@
|
||||
# Timeline window
|
||||
|
||||
To access the Timeline window, select **Sequencing** > **Timeline** from the Window menu. What the Timeline window shows depends on what you select in either the Project window or the Scene view.
|
||||
|
||||
For example, if you select a GameObject that is associated with a Timeline Asset, the Timeline window shows the tracks and clips from the Timeline Asset and the GameObject bindings from the Timeline instance.
|
||||
|
||||

|
||||
|
||||
_Selecting a GameObject associated with a Timeline Asset displays its tracks and clips, and the bindings from the Timeline instance_
|
||||
|
||||
If you haven’t selected a GameObject, the Timeline window informs you that the first step for creating a Timeline Asset and a Timeline instance is to select a GameObject.
|
||||
|
||||

|
||||
|
||||
_With no GameObject selected, the Timeline window provides instructions_
|
||||
|
||||
If a GameObject is selected and it is not associated with a Timeline Asset, the Timeline window provides the option for creating a new Timeline Asset, adding the necessary components to the selected GameObject, and creating a Timeline instance.
|
||||
|
||||

|
||||
|
||||
_Select a GameObject that is not associated with a Timeline Asset to create a new Timeline Asset, add components, and create a Timeline instance_
|
||||
|
||||
To use the Timeline window to view a previously created Timeline Asset, select the Timeline Asset in the Project window and open the Timeline window. The Timeline window shows the tracks and clips associated with the Timeline Asset, but without the track bindings to GameObjects in the Scene. In addition, the Timeline Playback Controls are disabled and there is no Timeline Playhead.
|
||||
|
||||

|
||||
|
||||
_Timeline Asset selected in the Project window shows its tracks and clips, but with no track bindings. The Timeline Playback Controls are disabled._
|
||||
|
||||
Timeline saves the track bindings to GameObjects in the Scene with the Timeline instance, not the Timeline Asset. For details on the relationship between the Project, Scene, Timeline Assets, and Timeline instances, see [Timeline overview](tl_about.md).
|
@ -0,0 +1,15 @@
|
||||
# Adding tracks
|
||||
|
||||
The Timeline window supports many different methods of adding tracks to the Track list. Depending on the method you choose, the Timeline window may also add track bindings to the Track header, clips to tracks, and components to GameObjects.
|
||||
|
||||

|
||||
|
||||
_Add Track menu_
|
||||
|
||||
The simplest method to add a track is to click the **Add** button and select the type of track from the **Add Track** drop-down menu. You can also right-click an empty area of the Track list to make the **Add Track** menu appear.
|
||||
|
||||
The Timeline window also supports dragging a GameObject into the Track list. Drag a GameObject into an empty area in the Track list and select the type of track to add from the context menu. Depending on the type of track selected, the Timeline window performs different actions:
|
||||
|
||||
* Select **Animation Track** and the Timeline window binds the GameObject to the Animation track. If the GameObject doesn't already have an Animator component, the Timeline window creates an Animator component for the GameObject.
|
||||
* Select **Activation Track** and the Timeline window binds the GameObject to the Activation track. There are some limitations when creating an Activation track when dragging a GameObject. For example, the main GameObject with the Playable Directory component should not be bound to an Activation track. Because this is the same GameObject that links the Timeline Asset to the Scene, activating and disabling the GameObject affects the length of Timeline instance.
|
||||
* Select **Audio Track** and the Timeline window adds an Audio Source component to the GameObject and binds this Audio Source component to the Audio track.
|
@ -0,0 +1,13 @@
|
||||
# Deleting tracks
|
||||
|
||||
Delete a track to remove the track, its clips, blends, and properties from the Timeline window. This is a destructive action that modifies a Timeline Asset and affects all Timeline instances based on the Timeline Asset.
|
||||
|
||||
There are many ways to delete tracks:
|
||||
|
||||
* Select a track and press the **Delete** key (or hold **Command** and press **Delete**).
|
||||
* Select a track. Right-click an empty area in the Track list and select **Delete** from the context menu.
|
||||
* Right-click a track and select **Delete** from the context menu.
|
||||
|
||||
Deleting an Animation track also deletes the recorded Infinite clips for Animation clips that were converted from Infinite clips. The Project window may still show recorded Infinite clips as children of a Timeline Asset because it is not updated until you save the Scene or Project.
|
||||
|
||||
You cannot delete a locked track.
|
@ -0,0 +1,14 @@
|
||||
# Duplicating tracks
|
||||
|
||||
Duplicating a track copies its clips, blends, and Inspector properties. If the duplicated track is bound to a GameObject, the binding is reset to **None**.
|
||||
|
||||

|
||||
|
||||
_Track binding for a duplicated track is reset to **None**_
|
||||
|
||||
There are many ways to duplicate tracks:
|
||||
|
||||
* Select a track. Right-click an empty area in the Track list and select **Duplicate** from the context menu.
|
||||
* Select a track. Hold Command/Control and press D.
|
||||
* Select a track. Hold Command/Control and press C, for copy, then press V, for paste.
|
||||
* Right-click a track and either select **Duplicate** from the context menu or hold Command/Control and press D.
|
@ -0,0 +1,28 @@
|
||||
# Track list and Track headers
|
||||
|
||||
Use the Track list to add, select, duplicate, delete, lock, mute, and reorder the tracks that comprise a Timeline Asset. You can also organize tracks into Track groups.
|
||||
|
||||

|
||||
|
||||
_Track list and Track headers for the Timeline instance named GroundETL_
|
||||
|
||||
Each track has two areas:
|
||||
|
||||
* Track list: Shows a Track header for each track.
|
||||
* Clips view: Shows the clips for each track.
|
||||
|
||||
The Track header contains the name of the track or its binding information. Track bindings are saved to the Playable Director component associated with the GameObject that is linked to the Timeline Asset. This association is referred to as a **Timeline instance** (see [Timeline overview](tl_about.md)).
|
||||
|
||||
Each Track header has a colored accent that identifies the track type and its clips:
|
||||
|
||||
* Activation tracks are green. Use Activation tracks to add Activation clips which set when the bound GameObject is active (shown). The GameObject is bound to the Activation track.
|
||||
* Animation tracks are blue. Use Animation tracks to add Animation clips that animate the bound GameObject. Use an Animation track and its Animation clips to [record basic animation](wf_rec_anim.md) or [animate a humanoid](wf_char_anim.md).
|
||||
* Audio tracks are orange. Use Audio tracks to add Audio clips for playing background music or sound effects. Each Audio clip is bound to an audio waveform. The audio source, that plays each waveform, is bound to the Audio track.
|
||||
* Control tracks are turquoise. Use Control tracks to add Control clips which are special clips that control a nested Timeline instance, Particle System, Prefab instance, or ITimeControl Script. [How the Control clip is created](insp_clp_ctrl_com.md) determines what it controls.
|
||||
* Playable tracks are white. Use Playable tracks to add Playable clips. Each Playable clip is bound to a script that uses the [Playables API](https://docs.unity3d.com/Manual/Playables.html) to create custom animation tools, effects or gameplay mechanisms.
|
||||
|
||||
Each Track header is also identified by an icon. If a track has a binding error or if the bound GameObject is disabled, the icon representing a track changes to an alert icon. For example, if an Animation track is bound to a GameObject that is disabled at the location of the Playhead, the icon switches to an alert icon.
|
||||
|
||||

|
||||
|
||||
_An alert icon indicates that the RedCube bound GameObject is disabled at the start of the Timeline instance_
|
@ -0,0 +1,13 @@
|
||||
# Locking tracks
|
||||
|
||||
Lock a track to prevent editing of the track and any of the clips used by the track.
|
||||
|
||||
Use lock when you have finished animating a track and you want to avoid inadvertently modifying the track. You cannot edit or delete a locked track, or select its clips. The Lock icon identifies a locked track.
|
||||
|
||||

|
||||
|
||||
_Selected and locked track with Lock icon (red circle)_
|
||||
|
||||
To lock a track, right-click on the track and select **Lock** from the context menu. You can also select a track and press L. You can select and lock multiple tracks at a time. A track can be both locked and muted.
|
||||
|
||||
To unlock a track, click the Lock icon. You can also select a locked track and press L, or right-click and select **Unlock**.
|
@ -0,0 +1,15 @@
|
||||
# Muting tracks
|
||||
|
||||
Mute a track to disable its clips and their effect on the Scene.
|
||||
|
||||
You can also use mute when your Timeline instance includes many tracks with animations and you want to focus on the animation of one or a few tracks. The Mute icon identifies a muted track.
|
||||
|
||||

|
||||
|
||||
_Selected and muted track with Mute icon (red circle)_
|
||||
|
||||
To mute a track, right-click on the track and select **Mute** from the context menu. You can also select a track and press M. You can select and mute multiple tracks at a time. A track can be both muted and locked.
|
||||
|
||||
To unmute a track, click the Mute icon. You can also select a muted track and press M, or right-click and select **Unmute**.
|
||||
|
||||
**Note:** Muted tracks can be deleted.
|
@ -0,0 +1,17 @@
|
||||
# Reordering tracks and rendering priority
|
||||
|
||||
In the Timeline window, the rendering and animation priority is from the last track to the first track, where the last track takes priority. You can reorder tracks to change their rendering or animation priority.
|
||||
|
||||
For example, a Timeline instance has four Animation tracks, where the second and fourth Animation tracks animate the same GameObject. The fourth track overrides the animation on any of the preceding tracks. This animation priority is the reason why Animation Override tracks are added as child tracks, under Animation tracks.
|
||||
|
||||

|
||||
|
||||
_The second track (red arrow) and fourth track (selected, green arrow) animate the same GameObject (GreenCube). The fourth track has priority and overrides the second track.)_
|
||||
|
||||
To reorder tracks, select one or more tracks and drag until a white insert line appears between tracks in the Track list. The white insert line indicates the destination of the tracks you are dragging. The last selected track type displays beside the cursor. Release the mouse button to reorder tracks.
|
||||
|
||||

|
||||
|
||||
_For example, the white insert line indicates that the Control track (Storm) will be placed between the first track (Ground) and second track (Audio Src)_
|
||||
|
||||
An Animation Override track is bound to the same GameObject as its parent Animation track. Reordering an Animation Override track converts it to an Animation track and resets its binding to none.
|
@ -0,0 +1,25 @@
|
||||
# Selecting tracks
|
||||
|
||||
To select a single track, click its Track header in the Track list. You can also click an empty area in the Clips view. When you select a track, Timeline highlights its Track header and Clips view. Selecting a track deselects all other tracks or clips.
|
||||
|
||||
Selecting a track shows its properties in the Inspector window. The track properties change depending on the type of track and how many tracks you select. See [Timeline Inspector](insp_about.md) for details.
|
||||
|
||||
To select contiguous tracks, select the first track and then hold Shift and click the last track in the series. For example, to select three contiguous tracks, click the first track, then hold Shift and click the third track. All three tracks are selected.
|
||||
|
||||

|
||||
|
||||
_Click to select the first track_
|
||||
|
||||

|
||||
|
||||
_Hold Shift and click to select contiguous tracks_
|
||||
|
||||
Hold Command/Control and click to select discontiguous tracks. Hold Command/Control and click to deselect a selected track.
|
||||
|
||||
There are many other ways to select tracks:
|
||||
|
||||
* Hold down Shift and press the Up arrow or Down arrow keys to add and remove tracks from the selection.
|
||||
* To deselect all tracks or clips, click on an empty area in the Track list.
|
||||
* When a clip is selected on a track, press Tab to select the track.
|
||||
* Use the arrow keys to change the selected track. The Up and Down arrow keys select the previous or next track.
|
||||
* The Right arrow key selects the first clip on the track. If a Track group is already selected, the Left arrow and Right arrow keys collapse and expand the Track group.
|
@ -0,0 +1,85 @@
|
||||
# Defining custom USS styles
|
||||
|
||||
The first step to define a USS style is to create a new stylesheet. Stylesheets can be used to extend the Editor’s visual appearance.
|
||||
This can be done by adding a file named `common.uss` in an Editor folder in a `StyleSheets/Extensions` folder hierarchy.
|
||||
For example, the following locations are valid:
|
||||
|
||||
``` txt
|
||||
Assets/Editor/Stylesheets/Extensions/common.uss
|
||||
Assets/Editor/MyFolder/Stylesheets/Extensions/common.uss
|
||||
Assets/Editor/MyFolder1/MyFolder2/Stylesheets/Extensions/common.uss
|
||||
```
|
||||
|
||||
USS files (for Unity Style Sheet) use a [CSS-like syntax to describe new styles](https://docs.unity3d.com/Manual/UIE-USS.html). Here is an example:
|
||||
|
||||
``` css
|
||||
myStyle
|
||||
{
|
||||
width:18px;
|
||||
height:18px;
|
||||
background-image: resource("Assets/Editor/icon.png");
|
||||
}
|
||||
```
|
||||
|
||||
In this style, we specified that we wish to use a custom icon along with size properties. USS styles also support [pseudo-states](https://docs.unity3d.com/Manual/UIE-USS-Selectors.html), which works like [pseudo-classes in CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes). Timeline markers support the following pseudo-states:
|
||||
|
||||
- Collapsed: `.myStyle`
|
||||
- Normal: `.myStyle:checked`
|
||||
- Selected: `.myStyle:hover:focus:checked`
|
||||
|
||||
USS stylesheets also support Unity's light and dark themes. Styles in files named `dark.uss` and `light.uss` will be used as an override of the style in `common.uss`. For example:
|
||||
|
||||
- `common.uss`
|
||||
|
||||
``` css
|
||||
myStyle
|
||||
{
|
||||
width:18px;
|
||||
height:18px;
|
||||
color: rgb(125, 125, 125);
|
||||
}
|
||||
```
|
||||
|
||||
- `dark.uss`
|
||||
|
||||
``` css
|
||||
myStyle
|
||||
{
|
||||
color: rgb(0, 0, 0);
|
||||
background-image: resource("icon_dark.png");
|
||||
}
|
||||
```
|
||||
|
||||
- `light.uss`
|
||||
|
||||
``` css
|
||||
myStyle
|
||||
{
|
||||
color: rgb(255, 255, 255);
|
||||
background-image: resource("icon_light.png");
|
||||
}
|
||||
```
|
||||
|
||||
In the dark theme, `myStyle` will be resolved to:
|
||||
|
||||
``` css
|
||||
myStyle
|
||||
{
|
||||
width:18px;
|
||||
height:18px;
|
||||
color: rgb(0, 0, 0);
|
||||
background-image: resource("icon_dark.png");
|
||||
}
|
||||
```
|
||||
|
||||
and in the light theme:
|
||||
|
||||
``` css
|
||||
myStyle
|
||||
{
|
||||
width:18px;
|
||||
height:18px;
|
||||
color: rgb(255, 255, 255);
|
||||
background-image: resource("icon_light.png");
|
||||
}
|
||||
```
|
@ -0,0 +1,10 @@
|
||||
# Using the Timeline window
|
||||
|
||||
Use the Timeline window to create Timeline Assets and Timeline instances, record animation, schedule animation, and create cinematic content. This section shows you how to do the following tasks:
|
||||
|
||||
* [Create a Timeline Asset and Timeline instance](wf_instance.md)
|
||||
* [Record basic animation with an Infinite clip](wf_rec_anim.md)
|
||||
* [Convert an Infinite clip to an Animation clip](wf_conv_infinite.md)
|
||||
* [Animate a humanoid](wf_char_anim.md)
|
||||
* [Use Animation Override tracks and Avatar Masking](wf_mask.md)
|
||||
* [Nest Timeline Instances](wf_nested.md)
|
@ -0,0 +1,74 @@
|
||||
# Animating a humanoid
|
||||
|
||||
This task demonstrates how to use a Timeline instance to animate a humanoid with external motion clips. This workflow also demonstrates how to match clip offsets, manually adjust clip offsets, and create blends between clips to minimize jumping and sliding. Although this workflow uses a humanoid, you can use this animation method for any GameObject.
|
||||
|
||||
This workflow assumes that you have already created a Timeline instance with an empty Animation track bound to a humanoid. For example, the DefaultMale humanoid is bound to an empty Animation track:
|
||||
|
||||

|
||||
|
||||
_DefaultMale humanoid bound to an empty Animation track._
|
||||
|
||||
From your Project, drag a motion clip into the Animation track to create a new Animation clip. For example, drag an idle pose as the first clip to start the humanoid from an idle stance.
|
||||
|
||||
To position, resize, or trim your Animation clip in the Clips view, select **Mix mode** as the Clip Edit mode. There are [three different Clip Edit modes](clp_about.md) that change the editing behaviour of the Timeline window. When the Timeline window is in **Mix mode**, you can drag and trim clips to create blends.
|
||||
|
||||

|
||||
|
||||
_Animation track, bound to the DefaultMale humanoid, with an idle pose (Idle) as its Animation clip. The Mix mode (red circle) is the selected Clip Edit mode._
|
||||
|
||||
Add a second Animation clip. This example adds a run and turn left clip (named Run_Left) to the Animation track, and then resizes the clip to include one loop, so the DefaultMale runs and turns 180 degrees.
|
||||
|
||||

|
||||
|
||||
_Animation track with an Idle clip and a Run_Left clip_
|
||||
|
||||
Play the Timeline instance. In this example, the DefaultMale humanoid jumps between each Animation clip because the position of the humanoid at the end of the first Animation clip (Idle) does not match the position of the humanoid at the start of the next Animation clip (RunLeft).
|
||||
|
||||

|
||||
|
||||
_The humanoid jumps between the first Animation clip, which ends at frame 29 (red arrow and box), and the second Animation clip, which starts at frame 30 (ghost with green arrow and box)_
|
||||
|
||||
## Matching clips
|
||||
|
||||
To fix the animation jump between clips, match the offset of each Animation clip. The Timeline window provides [different methods for matching offsets](clp_match.md). In this example, Timeline matches the second Animation clip with the previous clip. To do this, select the Run_Left clip, right-click and select **Match Offsets to Previous Clip**.
|
||||
|
||||

|
||||
|
||||
_Right-click and select Match Offsets to Previous Clip to match the offsets of the selected Animation clip with the preceding Animation clip_
|
||||
|
||||

|
||||
|
||||
_After matching offsets, the position and rotation of the humanoid at the start of the second Animation clip (frame 30, ghost with green arrow) matches the position and rotation of the humanoid at the end of the first Animation clip (frame 29, red arrow)_
|
||||
|
||||
Play the Timeline instance again. Although the position and rotation of the humanoid matches, there is still a jump between the two Animation clips because the humanoid is in different poses. At the end of the first Animation clip, the humanoid is standing upright with its feet together. At the start of the second Animation clip, the humanoid is bent forward with its feet apart.
|
||||
|
||||
## Blending clips
|
||||
|
||||
[Create a blend](clp_blend.md) to remove the jump and transition between the two poses. Adjust the size of the clips, the Blend Area, the Clip In, and the shape of each Blend Curve to create a transition between the two poses. For example, in the transition between the Idle clip and the Run_Left clip, the Idle clip was resized to 36 frames and the Run_Left clip was repositioned to start at frame 25. The rest of the clip properties are unchanged from their default values.
|
||||
|
||||

|
||||
|
||||
_With Mix mode selected, you can create a blend (red circle) between two clips to create a smooth transition between two animations._
|
||||
|
||||
As the Idle clip transitions to the Run_Left clip, the blend removes the obvious jump between poses. The transition between most body parts appears natural, however in this example, the blend between the different positions of the foot results in an unnatural foot slide.
|
||||
|
||||
## Reducing foot slide
|
||||
|
||||
To reduce foot sliding, manually adjust the offset of an Animation clip so that the position of the foot changes less drastically. To manually adjust the offset, select the Animation clip in the Timeline window. In the Inspector window, expand **Animation Playable Asset**.
|
||||
|
||||

|
||||
|
||||
_Select an Animation clip. In the Inspector window, expand **Animation Playable Asset** (red) to view the **Clip Transform Offsets**._
|
||||
|
||||
The rotation and position **Clip Transform Offsets** are not zero because performing **Match Offsets to Previous Clip** already set these values to match the root (hips) of the humanoid at the end of the previous Animation clip.
|
||||
|
||||
Under **Clip Transform Offsets**, enable the Move tool. The Move Gizmo appears in the Scene view, at the root of the Animation clip.
|
||||
|
||||

|
||||
|
||||
_Enable the Move tool (Inspector window, red arrow) to show the Move Gizmo (green arrow) in the Scene view_
|
||||
|
||||
Use one of the following methods to manually adjust the offset position of the Animation clip:
|
||||
|
||||
* In the Scene view, drag the Move Gizmo.
|
||||
* In the Inspector window, under **Clip Transform Offsets**, change the value of the appropriate **Position** property.
|
@ -0,0 +1,15 @@
|
||||
# Converting an Infinite clip to an Animation clip
|
||||
|
||||
An Infinite clip appears as a dope sheet. An Infinite clip cannot be positioned, trimmed, or split because it does not have a defined duration. To position, trim, split, or perform other clip manipulations on an Infinite clip, you must first convert it to an Animation clip. You cannot convert an Animation clip back to an Infinite clip.
|
||||
|
||||
To convert an Infinite clip to an Animation clip, click the Track menu icon and select **Convert to Clip Track**:
|
||||
|
||||

|
||||
|
||||
_The Track menu (circled) converts an Infinite clip to an Animation clip._
|
||||
|
||||
You can also right-click the track and select **Convert to Clip Track** from the context menu. The Track menu and context menu are the same.
|
||||
|
||||

|
||||
|
||||
_An infinite clip after it has been converted to an Animation clip_
|
@ -0,0 +1,23 @@
|
||||
# Creating a Timeline Asset and Timeline instance
|
||||
|
||||
To use a Timeline Asset in your Scene, associate the Timeline Asset with a GameObject using a [Playable Director](play_director.md) component. Associating a Timeline Asset with a Playable Director component creates a Timeline instance and allows you to specify which objects in the Scene are animated by the Timeline Asset. To animate a GameObject, it must also have an [Animator](https://docs.unity3d.com/Manual/class-Animator.html) component.
|
||||
|
||||
The Timeline window automatically creates a Timeline instance while creating a new Timeline Asset. The Timeline window also creates the necessary components.
|
||||
|
||||
To create a new Timeline Asset and Timeline instance, follow these steps:
|
||||
|
||||
1. In your Scene, select the GameObject that you want to use as the focus of your cinematic or other gameplay-based sequence.
|
||||
2. Open the Timeline window (menu: **Window** > **Sequencing** > **Timeline**). If the GameObject does not yet have a Playable Director component attached to a Timeline Asset, a message in the Timeline window prompts you to click the **Create** button.
|
||||
3. Click **Create**. A dialog box prompts you for the name and location of the Timeline Asset you are creating. You can also specify tags to identify the Timeline Asset.
|
||||
4. Click **Save**.
|
||||
|
||||

|
||||
|
||||
|
||||
The Timeline window does the following:
|
||||
|
||||
* Saves a new Timeline Asset to the Assets directory of your Project. If you did not change the name and location of the Timeline Asset you are creating, the Timeline window creates a name based on the selected GameObject with the "Timeline" suffix. For example, selecting the GameObject called "Enemy" names the Asset "EnemyTimeline".
|
||||
* Adds an empty Animation track to the Timeline Asset.
|
||||
* Adds a Playable Director component to the selected GameObject, and sets the **Playable** property to the Timeline Asset. This creates a Timeline instance.
|
||||
* Sets the binding on the Animation track in the Playable Director component to the selected GameObject. The Animation track does not have any clips, so the selected GameObject is not animated.
|
||||
* Adds an Animator component to the selected GameObject. The Animator component animates the GameObject through the Timeline instance. The GameObject cannot be animated without an Animator component.
|
@ -0,0 +1,43 @@
|
||||
# Using an Animation Override track and an Avatar Mask
|
||||
|
||||
This task demonstrates how to use an Animation Override track and an Avatar Mask to replace the upper-body animation of an Animation track. Use this technique to animate a humanoid to, for example, run and carry an object. For information on creating an Avatar mask, see [Avatar Mask window](https://docs.unity3d.com/Manual/class-AvatarMask.html).
|
||||
|
||||
This task assumes that you have already [created a Timeline instance](wf_instance.md) with a simple Animation clip on an Animation track bound to a humanoid:
|
||||
|
||||

|
||||
|
||||
_This example uses a humanoid bound to a simple run cycle animation (RunForward) that loops once_
|
||||
|
||||
Right-click the Animation track and select **Add Override Track** from the context menu. An Animation Override track, named Override 0, is linked to the selected Animation track. Notice that the Animation Override track is not bound to a GameObject. Because the Override track is linked to the Animation track above, the Override track is bound to the same GameObject, in this case, the DefaultMale humanoid.
|
||||
|
||||

|
||||
|
||||
_To add an Override track, right-click the Animation track and select Add Override Track from the context menu]_
|
||||
|
||||
From your Project, drag an Animation Clip with upper-body animation into the Override track. For example, drag an animation of a humanoid standing still and waving their arms. Position and resize the clip to match the Animation clip that you want to override.
|
||||
|
||||

|
||||
|
||||
_The Animation Override track contains an Animation clip of a humanoid standing still, waving their arms (WavingArms). This clip was resized to match the Animation clip (RunForward) of the parent Animation track._
|
||||
|
||||
Play the Timeline instance. In this example, the WavingArms clip completely overrides the RunForward clip. To combine the lower-body animation from one Animation clip with upper-body animation from another Animation clip, specify an Avatar Mask for the Animation Override track.
|
||||
|
||||

|
||||
|
||||
_To specify an Avatar Mask, select the Override track to view its properties in the Inspector window_
|
||||
|
||||
From the Project, drag an Avatar Mask, that masks the lower body animation, into the Avatar Mask property in the Inspector window. Enable the **Apply Avatar Mask** checkbox. An Avatar Mask icon appears beside the track name.
|
||||
|
||||

|
||||
|
||||
_An Avatar Mask, that masks the lower body animation, is specified for the Animation Overview clip in the Inspector window. This allows the upper body animation to pass through._
|
||||
|
||||

|
||||
|
||||
_The Avatar Mask icon (red) indicates that the Animation Override track uses an Avatar Mask._
|
||||
|
||||
Play the Timeline instance. In this example, the DefaultMale humanoid uses upper-body animation from the WavingArms clip and lower-body animation from the RunForward clip. To temporarily disable the Avatar Mask, click the Avatar Mask icon.
|
||||
|
||||

|
||||
|
||||
_The Avatar Mask icon (red) is gray when disabled. The WavingArms clip completely overrides the RunForward clip._
|
@ -0,0 +1,49 @@
|
||||
# Nesting Timeline instances
|
||||
|
||||
Timeline supports nesting Timeline instances. A nested Timeline instance refers to a Timeline instance that is added within another Timeline instance. The **master Timeline instance** refers to the main or parent Timeline instance that includes other Timeline instances.
|
||||
|
||||
Nesting Timeline instances is useful if you have a large team working on different aspects of a Project and you want them to collaborate on the same cinematic or cut-scene.
|
||||
|
||||
For example, you are developing a puzzle game that starts with a cinematic of the character walking into frame while the pieces on the game board move into position. You could create a master Timeline instance for the character walking into frame. You could create another Timeline instance for the game board animation. You could then nest the game board animation into the master Timeline instance of the character walking into frame.
|
||||
|
||||

|
||||
|
||||
_The master NestTL Timeline instance has a character walking and theme music. A Control track nests the BoardTL Timeline instance for the game board animation._
|
||||
|
||||
By creating a master Timeline instance with nested Timeline instances, different teams can work on different animations and then combine the animations into one master Timeline. In the puzzle game example, one team could work on the character Timeline instance, and another team could work on the game board animation.
|
||||
|
||||
When you have two Timeline instances, and you want to nest one instance into the other, open the Timeline instance that you want to be the master Timeline instance. To ensure that the Timeline window does not switch while you select GameObjects, click the lock icon (red arrow):
|
||||
|
||||

|
||||
|
||||
_The master NestTL Timeline instance has a character walking and theme music._
|
||||
|
||||
Find the GameObject in your Scene that is associated with the Timeline instance that you want to nest inside the master Timeline instance. Drag the GameObject into the Clips view of the Timeline window.
|
||||
|
||||

|
||||
|
||||
_The Board GameObject is associated with the BoardTL Timeline instance. Drag the Board GameObject into the NestTL master Timeline to nest the BoardTL Timeline instance in the NestTL Timeline instance._
|
||||
|
||||
The Timeline window creates a Control track and places the Control clip where you drop the GameObject. The Control clip is set to the same size as the Timeline instance. When a Control clip contains a nested Timeline instance, a downward arrow appears beside its name. To edit a nested Timeline instance from the master timeline, double-click its Control clip.
|
||||
|
||||

|
||||
|
||||
_Double-click the Control clip to edit the nested BoardTL Timeline instance from within the master_
|
||||
|
||||
A warning icon appears beside the name of the nested Timeline instance because the Timeline Playhead is outside the range of the nested Timeline. Timeline also disables the Timeline Playhead controls.
|
||||
|
||||
When you edit a nested Timeline instance, you cannot change the duration of the nested Timeline instance. You must return to the master Timeline instance and change the duration of the Control clip to change the duration of the nested Timeline instance. To return to the master, click the name of the master Timeline instance (red arrow):
|
||||
|
||||

|
||||
|
||||
_Warning icon (red circle) means the Timeline Playhead Controls are disabled._
|
||||
|
||||
The Timeline window is in this state because, by default, the size of the Control clip in the master Timeline instance determines when the nested Timeline instance is active. Use one of the following methods to change this state and edit the nested Timeline instance:
|
||||
|
||||
* Click the Timeline ruler to move the Timeline Playhead into the nested Timeline. This enables editing and the Timeline Playback Controls.
|
||||
* In the master Timeline instance, move the Timeline Playhead to within the Control clip before you double-click the Control clip.
|
||||
* In the master Timeline instance, select the Control clip, and disable the Control Activation property in the Inspector window.
|
||||
|
||||

|
||||
|
||||
_Disable the Control Activation property (red outline) to have the nested Timeline instance active throughout the duration of the master Timeline instance._
|
@ -0,0 +1,59 @@
|
||||
# Recording basic animation with an Infinite clip
|
||||
|
||||
You can record animation directly to an Animation track. When you record directly to an empty Animation track, you create an **Infinite clip**.
|
||||
|
||||
An Infinite clip is a clip that contains basic key animation recorded through the Timeline window. An Infinite clip cannot be positioned, trimmed, or split because it does not have a defined size: it spans the entirety of an Animation track.
|
||||
|
||||
Before creating an Infinite clip, you must [add an empty Animation track](trk_add.md) for the GameObject that you want to animate.
|
||||
|
||||
In the Track list, click the red circular Record button for the empty Animation track to enable Record mode.
|
||||
|
||||

|
||||
|
||||
_Click the Record button on an empty track to enable Record mode_
|
||||
|
||||
When a track is in Record mode, the clip area of the track is drawn in red with the "Recording..." message, and the Record button blinks on and off.
|
||||
|
||||

|
||||
|
||||
_Timeline window in Record mode_
|
||||
|
||||
When in Record mode, any modification to an animatable property of the GameObject sets a key at the location of the Timeline Playhead.
|
||||
|
||||
To start creating an animation, move the Timeline Playhead to the location of the first key, and do **one** of the following:
|
||||
|
||||
* In the Inspector window, right-click the name of the property and choose **Add Key**. This adds an animation key for the property without changing its value. A diamond appears in the Infinite clip to show the position of the key.
|
||||
* In the Inspector window, change the value of the animatable property of the GameObject. This adds an animation key for the property with its changed value. A diamond appears in the Infinite clip.
|
||||
* In the Scene view, either move, rotate, or scale the GameObject. This automatically adds a key for the properties you change. A diamond appears in the Infinite clip.
|
||||
|
||||

|
||||
|
||||
_Red background indicates that you’ve added an animation curve for the property to the clip_
|
||||
|
||||

|
||||
|
||||
_Setting a key adds a diamond to the Infinite clip_
|
||||
|
||||
Move the playhead to a different position on the Timeline and change the animatable properties of the GameObject. At each position, the Timeline window adds a diamond to the Infinite clip for any changed properties and adds a key to its associated animation curves.
|
||||
|
||||
While in Record mode, you can right-click the name of an animatable property name to perform keying operations such as setting a key without changing its value, jumping to the next or previous keys, and removing keys. For example, to set a key for the position of a GameObject without changing its value, right-click **Position** and select **Add Key** from the context menu.
|
||||
|
||||

|
||||
|
||||
_Right-click the name of an animatable property to perform keying operations_
|
||||
|
||||
When you finish the animation, click the blinking Record button to disable Record mode.
|
||||
|
||||
An Infinite clip appears as a dope sheet in the Timeline window, but you cannot edit the keys in this view. Use [the Curves view to edit keys](crv_keys_edit.md). You can also double-click the Infinite clip and edit the keys with the Animation window.
|
||||
|
||||

|
||||
|
||||
_An Infinite clip appears as a dope sheet_
|
||||
|
||||
Save the Scene or Project to save the Timeline Asset and the Infinite clip. The Timeline window saves the key animation from the Infinite clip as a source asset. The source asset is named "Recorded" and saved as a child of the Timeline Asset in the Project.
|
||||
|
||||

|
||||
|
||||
_Recorded clips are saved under the Timeline Asset in the Project_
|
||||
|
||||
For every additional recorded Infinite clip, the Timeline window numbers each clip sequentially, starting at "(1)". For example, a Timeline Asset with three recorded Infinite clips are named "Recorded", "Recorded (1)", and "Recorded (2)". If you delete a Timeline Asset, its recorded clips are also removed.
|