I. Introduction
This article will describe how to get started with Timeline, from installation to configuration, and share a simple process and steps to understand how Unity Timeline works.
Two, configuration
Time line is a movie sequence tool, there are various animations in a single game, so it is a player placed inside the game object.
1. Unity installs Timeline
In the Windows list on the upper left of Unity, open the Pakage Manager window, then adjust the Pakages: mode to Unity Registry, type Time in the search field on the right, and click Install in the lower right corner of the window to install. If there is only remove, it means Timeline has been installed.
2. Hirarchy Addition Playable Director
Create an empty game object, and click Add Component below, enter Playable Director and click the Component, its name and icon are shown in the figure above.
3. Assets create Time line material
In Unity Assets, find a place and right-click, select Create, find and click Timeline, the icon is shown in the figure above.
4. Link Time line material to Playable Director
In the Playable column, drag the newly created Time line to here. If there is no name for the material, the material will be called New Timeline, and the brackets behind indicate that this is a Timeline material.
3. Use steps
Next, use the simplest two tracks of the Time line to demonstrate, including how to add tracks, adjust the track time axis, and how to use curves. You can explore other tracks by yourself, or wait for the next article.
1. Create a test object
Create a Cube, if it is a brand new scene, the object will appear in the center.
2. Turn on the Time line and adjust the time scale
Click the game object to add Time line in Hirarchy, click New Timeline (Time line Assets) twice in the Inspector, there is a gear on the right side of the window after entering, click and select Seconds.
3. Create Activation Tracks
Click the “+” sign and select Activation Track. There will be a green tick on the left, a track named Activation Track, and an Active time segment will appear on the right, drag the time segment so that the leftmost part is 1.00.
4. Create Animation Track
Click the “+” sign and select Animation Track. There is a cyan triangle field on the left, and it prompts the designer to None (Animator), drag the created Cube to this field. Pop up the window, click Create Animator on Cube at this time.
5. Movie recording – add start frame
Click on the red circle, the track will turn red, and drag the white lever at time to 1.00. Click on Cube in Hirarchy, right click on Position, and select Add Key. This means adding a keyframe at that time.
6. Movie recording – add end frame
Drag the white lever located at Time to adjust it to 5.00. Click Hirarchy’s Cube and adjust the Position to 5,0,0. Click the red circle to the left of the track to end the recording.
7. Convert to Clip Track (optional)
Right-click anywhere in the Animation Track and select Convert To Clip Track to turn the animation into an adjustable animation clip.
8. Round A test – can he move?
Click the button |<< to move the white lever located at time to 0.00. Press > to start playing, and found that Activation Track is not functioning. Drag the Cube to the None position of the Track, and play again. This time, the object will disappear at first, and it will move immediately when it reappears.
9. Adjust Curves
Back in the Time line, click the button next to the red circle to show the curve. Click the triangle on the left side of Position to open the three storage coordinates, click the X coordinate, and adjust the light gray lever at the end of the animation downward, as shown in the figure above.
10. Round B test – curve movement
Press play and notice that the object barely moves at first, then gets faster and faster until the animation ends.
4. Postscript
This article introduces the introduction of Time line, and makes readers familiar with the use of Time line through the two most commonly used tracks of Activation and Animation. The next article will cover the various tracks and a basic introduction.