SofdecTutorials

Timeline video sequence

In a previous post, we learned how to play videos from a script by attaching a CriManaMovieController to a 3D object in a Unity scene. It is also possible to control video playback using the Unity Timeline thanks to the CRIWARE Timeline extension.

Introduction

The Timeline – which has long been included in Unity – is a powerful tool for creating games, animations, cinematics, and more. It allows you to manage and control the objects and events of a scene over time. By using the Timeline, you can easily create complex animations and cut scenes, and add time control to visuals without any programming knowledge.

In the video above, the Timeline is used to synchronize the animation of a startled character as a video starts playing on the wall next to him.

 

Usage

Let’s take a look at the following sample of the CRIWARE plug-in for Unity:

/cri/unity/samples/UnityProject/Assets/Scenes/crimana/advanced/Scene_05_TimelineExtension.unity

When you select the game object named “ManaTimeline” in this sample, the associated Timeline asset is displayed in the Timeline window.

On the Timeline, you can then edit video tracks using the standard Unity functions. The general flow is explained below.
1.Creating a Track

You can create a new Mana track by right-clicking on an empty area of ​​the Timeline or clicking on the Add button. Then, select CriTimeline.Mana -> Cri Mana Track.

 

2.Creating a Clip

You can bind components that inherit from CriManaMovieMaterial to CriMana tracks.

  • CriManaMovieController
  • CriManaMovieControllerForUI

All Clips placed on the track will play back using the component bound to the same track.

3.Editing clips

You can set the timing, frame rate, fade-in and fade-out, etc. for each clip.

Advantages

You may run a series of animation sequences from a script without using the Timeline feature, but you will have to use coroutines, yields, etc… which may be cumbersome and time-consuming.

On the other hand, for designers who are already familiar with video creation tools such as After Effects and Davinci Resolve, Unity’s Timeline offers a convenient way for creating linear movie sequences. Once coupled with CRIWARE’s Unity SDK, you can easily synchronize video playback within a scene!

You can find more information about how to use the Timeline extension in our online documentation:

https://game.criware.jp/manual/unity_plugin_en/latest/contents/mana4u_extension_timeline.html