時(shí)間軸概述
使用 __Timeline Editor 窗口__可通過直觀排列鏈接到場(chǎng)景游戲?qū)ο蟮能壍篮图糨媮韯?chuàng)建過場(chǎng)動(dòng)畫、影片和游戲序列。

對(duì)于每個(gè)過場(chǎng)動(dòng)畫、影片或游戲序列,Timeline Editor 窗口將保存下列內(nèi)容:
__時(shí)間軸資源__:存儲(chǔ)軌道、剪輯和錄制動(dòng)畫,而不存儲(chǔ)要?jiǎng)赢嫽奶囟ㄓ螒驅(qū)ο蟮逆溄?。時(shí)間軸資源將保存到項(xiàng)目。
__時(shí)間軸實(shí)例__:存儲(chǔ)由時(shí)間軸資源動(dòng)畫化的特定游戲?qū)ο蟮逆溄?。這些鏈接(稱為__綁定__)將保存到場(chǎng)景。
時(shí)間軸資源
Timeline Editor 窗口將軌道和剪輯定義保存為__時(shí)間軸資源__。如果在創(chuàng)建影片、過場(chǎng)動(dòng)畫或游戲序列時(shí)錄制關(guān)鍵動(dòng)畫,則 Timeline Editor 窗口會(huì)將錄制的動(dòng)畫保存為時(shí)間軸資源的子項(xiàng)。

時(shí)間軸實(shí)例
盡管時(shí)間軸資源定義了過場(chǎng)動(dòng)畫、影片或游戲序列的軌道和剪輯,但無法將時(shí)間軸資源直接添加到場(chǎng)景。要使用時(shí)間軸資源對(duì)場(chǎng)景中的游戲?qū)ο筮M(jìn)行動(dòng)畫化,必須創(chuàng)建__時(shí)間軸實(shí)例__。
Timeline Editor 窗口提供了一種在創(chuàng)建時(shí)間軸資源時(shí)創(chuàng)建時(shí)間軸實(shí)例的自動(dòng)化方法。
如果在場(chǎng)景中選擇的某個(gè)游戲?qū)ο缶哂信c時(shí)間軸資源關(guān)聯(lián)的 Playable Director 組件,則綁定將顯示在 Timeline Editor 窗口和 Playable Director 組件(Inspector 窗口)中。

重復(fù)使用時(shí)間軸資源
由于時(shí)間軸資源和時(shí)間軸實(shí)例是分開的,因此可將同一時(shí)間軸資源重復(fù)用于多個(gè)時(shí)間軸實(shí)例。
例如,可創(chuàng)建名為 VictoryTimeline 的時(shí)間軸資源,在其中包含在主要游戲角色 (Player) 獲勝時(shí)播放的動(dòng)畫、音樂和粒子效果。要重復(fù)使用 VictoryTimeline 時(shí)間軸資源以動(dòng)畫化同一場(chǎng)景中的另一個(gè)游戲角色 (Enemy),可為次要游戲角色創(chuàng)建另一個(gè)時(shí)間軸實(shí)例。


由于重復(fù)使用時(shí)間軸資源,因此在 Timeline Editor 窗口中對(duì)時(shí)間軸資源進(jìn)行的任何修改都會(huì)導(dǎo)致對(duì)所有時(shí)間軸實(shí)例進(jìn)行更改。
例如,在上一個(gè)示例中,如果在修改 Player 時(shí)間軸實(shí)例時(shí)在 Timeline Editor 窗口中刪除 Fireworks 控制軌道,則會(huì)從 VictoryTimeline 時(shí)間軸資源中刪除該軌道。此外還會(huì)從 VictoryTimeline 時(shí)間軸資源的所有實(shí)例(包括 Enemy 時(shí)間軸實(shí)例)中刪除 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.(時(shí)間軸窗口允許您創(chuàng)建電影內(nèi)容,游戲序列,音頻序列和復(fù)雜的粒子效果。您可以在相同的序列中編輯多個(gè)不同的游戲?qū)ο?,例如一個(gè)角色與場(chǎng)景交互的過場(chǎng)動(dòng)畫或腳本序列。在時(shí)間軸窗口中,您可以有多種類型的軌道,每個(gè)軌道可以包含多個(gè)剪輯,可以移動(dòng)、修剪和混合。它對(duì)于創(chuàng)建更復(fù)雜的動(dòng)畫序列是有用的,需要許多不同的游戲?qū)ο笠黄鹁幣拧?/span>)
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.(時(shí)間軸窗口比動(dòng)畫窗口更新。它在2017.1版本被添加到Unity中,取代了一些動(dòng)畫窗口的功能。要開始學(xué)習(xí)Unity中的時(shí)間軸,請(qǐng)?jiān)L問用戶手冊(cè)中的時(shí)間軸部分。)

The Animation window(動(dòng)畫窗口)
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.(動(dòng)畫窗口允許您創(chuàng)建單獨(dú)的動(dòng)畫剪輯以及查看導(dǎo)入的動(dòng)畫剪輯。動(dòng)畫剪輯存儲(chǔ)一個(gè)游戲?qū)ο蠡蛞粋€(gè)游戲?qū)ο髮哟谓Y(jié)構(gòu)的動(dòng)畫。動(dòng)畫窗口對(duì)于動(dòng)畫游戲中的離散項(xiàng)目非常有用,例如擺動(dòng)的鐘擺、滑動(dòng)的門或旋轉(zhuǎn)的硬幣。動(dòng)畫窗口一次只能顯示一個(gè)動(dòng)畫剪輯。)
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).(動(dòng)畫窗口是在4.0版本的Unity中添加的。動(dòng)畫窗口比時(shí)間軸窗口更老。它提供了一個(gè)簡(jiǎn)單的方法來創(chuàng)建動(dòng)畫剪輯和動(dòng)畫單獨(dú)的游戲?qū)ο螅阍趧?dòng)畫窗口中創(chuàng)建的剪輯可以使用anim Animator控制器進(jìn)行組合和混合。然而,要?jiǎng)?chuàng)建更多復(fù)雜的序列,包括許多不同的游戲?qū)ο螅銘?yīng)該使用時(shí)間軸窗口(見上面)。)
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.(動(dòng)畫窗口有一個(gè)“時(shí)間線”作為它的用戶界面的一部分(horiontal條標(biāo)注了時(shí)間輪廓),但是這是獨(dú)立于時(shí)間線窗口的。)
To start learning about animation in Unity, visit the?Animation section?of the user manual.(要開始學(xué)習(xí)Unity中的動(dòng)畫,請(qǐng)?jiān)L問用戶手冊(cè)中的動(dòng)畫部分。)
