欢迎光临散文网 会员登陆 & 注册

时间轴概述

2020-06-29 09:43 作者:unity_某某师_高锦锦  | 我要投稿

使用 __Timeline Editor 窗口__可通过直观排列链接到场景游戏对象的轨道和剪辑来创建过场动画、影片和游戏序列。

Timeline Editor 窗口中的影片。轨道和剪辑将保存到项目。对游戏对象的引用将保存到场景。

对于每个过场动画、影片或游戏序列,Timeline Editor 窗口将保存下列内容:

  • __时间轴资源__:存储轨道、剪辑和录制动画,而不存储要动画化的特定游戏对象的链接。时间轴资源将保存到项目。

  • __时间轴实例__:存储由时间轴资源动画化的特定游戏对象的链接。这些链接(称为__绑定__)将保存到场景。

时间轴资源

Timeline Editor 窗口将轨道和剪辑定义保存为__时间轴资源__。如果在创建影片、过场动画或游戏序列时录制关键动画,则 Timeline Editor 窗口会将录制的动画保存为时间轴资源的子项。

时间轴资源保存轨道和剪辑(红色)。如果录制关键动画,则录制的剪辑将保存为时间轴资源的子项(蓝色)。

时间轴实例

尽管时间轴资源定义了过场动画、影片或游戏序列的轨道和剪辑,但无法将时间轴资源直接添加到场景。要使用时间轴资源对场景中的游戏对象进行动画化,必须创建__时间轴实例__。

Timeline Editor 窗口提供了一种在创建时间轴资源时创建时间轴实例的自动化方法。

如果在场景中选择的某个游戏对象具有与时间轴资源关联的 Playable Director 组件,则绑定将显示在 Timeline Editor 窗口和 Playable Director 组件(Inspector 窗口)中。

Playable Director 组件显示时间轴资源(蓝色)及其绑定的游戏对象(红色)。Timeline Editor 窗口在轨道列表中显示相同绑定(红色)。

重复使用时间轴资源

由于时间轴资源和时间轴实例是分开的,因此可将同一时间轴资源重复用于多个时间轴实例。

例如,可创建名为 VictoryTimeline 的时间轴资源,在其中包含在主要游戏角色 (Player) 获胜时播放的动画、音乐和粒子效果。要重复使用 VictoryTimeline 时间轴资源以动画化同一场景中的另一个游戏角色 (Enemy),可为次要游戏角色创建另一个时间轴实例。

Player 游戏对象(红色)附加到 VictoryTimeline 时间轴资源
Enemy 游戏对象(蓝色)也附加到 VictoryTimeline 时间轴资源

由于重复使用时间轴资源,因此在 Timeline Editor 窗口中对时间轴资源进行的任何修改都会导致对所有时间轴实例进行更改。

例如,在上一个示例中,如果在修改 Player 时间轴实例时在 Timeline Editor 窗口中删除 Fireworks 控制轨道,则会从 VictoryTimeline 时间轴资源中删除该轨道。此外还会从 VictoryTimeline 时间轴资源的所有实例(包括 Enemy 时间轴实例)中删除 Fireworks 控制轨道。

What’s the difference between the Animation window and the Timeline window?(Animation和Timeline的不同之处)

The Timeline window(Timeline窗口)

The Timeline window allows you to create cinematic content, game-play sequences, audio sequences and complex particle effects. You can animate many different GameObjects within the same sequence, such as a cut scene or scripted sequence where a character interacts with scenery. In the timeline window you can have multiple types of track, and each track can contain multiple clips that can be moved, trimmed, and blended between. It is useful for creating more complex animated sequences that require many different GameObjects to be choreographed together.(时间轴窗口允许您创建电影内容,游戏序列,音频序列和复杂的粒子效果。您可以在相同的序列中编辑多个不同的游戏对象,例如一个角色与场景交互的过场动画或脚本序列。在时间轴窗口中,您可以有多种类型的轨道,每个轨道可以包含多个剪辑,可以移动、修剪和混合。它对于创建更复杂的动画序列是有用的,需要许多不同的游戏对象一起编排。

The Timeline window is newer than the Animation window. It was added to Unity in version 2017.1, and supercedes some of the functionality of the Animation window. To start learning about Timeline in Unity, visit the Timeline section of the user manual.(时间轴窗口比动画窗口更新。它在2017.1版本被添加到Unity中,取代了一些动画窗口的功能。要开始学习Unity中的时间轴,请访问用户手册中的时间轴部分。

Timeline窗口显示不同的片段类型在相同的序列中

The Animation window(动画窗口)

The Animation window allows you to create individual animation clips as well as viewing imported animation clips. Animation clips store animation for a single GameObject or a single hierarchy of GameObjects. The Animation window is useful for animating discrete items in your game such as a swinging pendulum, a sliding door, or a spinning coin. The animation window can only show one animation clip at a time.(动画窗口允许您创建单独的动画剪辑以及查看导入的动画剪辑。动画剪辑存储一个游戏对象或一个游戏对象层次结构的动画。动画窗口对于动画游戏中的离散项目非常有用,例如摆动的钟摆、滑动的门或旋转的硬币。动画窗口一次只能显示一个动画剪辑。

The Animation window was added to Unity in version 4.0. The Animation window is an older feature than the Timeline window. It provides a simple way to create animation clips and animate individual GameObjects, and the clips you create in the Animation window can be combined and blended between using anim Animator controller. However, to create more complex sequences involving many disparate GameObjects you should use the Timeline window (see above).(动画窗口是在4.0版本的Unity中添加的。动画窗口比时间轴窗口更老。它提供了一个简单的方法来创建动画剪辑和动画单独的游戏对象,你在动画窗口中创建的剪辑可以使用anim Animator控制器进行组合和混合。然而,要创建更多复杂的序列,包括许多不同的游戏对象,你应该使用时间轴窗口(见上面)。

The animation window has a “timeline” as part of its user interface (the horiontal bar with time delineations marked out), however this is separate to the Timeline window.(动画窗口有一个“时间线”作为它的用户界面的一部分(horiontal条标注了时间轮廓),但是这是独立于时间线窗口的。)

To start learning about animation in Unity, visit the Animation section of the user manual.(要开始学习Unity中的动画,请访问用户手册中的动画部分。)

Animation窗口,显示为关键帧模式显示所有物体在层级视图面板(在这种情况下一个robot arm被多个移动部位控制)多个动态关键帧构成了一个动画片段


时间轴概述的评论 (共 条)

分享到微博请遵守国家法律