Choose your operating system:
Windows
macOS
Linux
Template Sequences allow you to reuse a sequence with multiple assets by using a single root binding, the Bound Actor Class. The Bound Actor Class designates the type of actor that the Template Sequence plays onto, and the template can be reused in multiple sequences. You can create a specific track or whole sequence you want to reuse and associate it to a specific object binding, similarly to how skeletal animations can be played on any compatible Skeletal Mesh. Additionally, Template Sequences can be manipulated and edited like any other sequence.
When using the Template Sequence, the bound actor appears as spawnable in the sequence, and you can manipulate and animate the actor as needed. When applying the Template Sequence, if the template is mapped onto an existing actor, a new actor will not spawn. You can also use the Template Sequence as a standalone sequence included in the Master Sequence.
Template Sequences also streamline using camera anims by specifying the Cine Camera Actor though the Bound Actor Class. This automatically sets the Cine Camera Actor as the
main camera in the template and when the template is brought into a sequence.
In this how-to, we will be using the Cine Camera Actor as our Bound Actor Class.
This feature is currently in Beta. Eventually, this feature will replace Camera Anims, which use Matinee.
Setting Up a Template Sequence
Under Animation in the Content Browser, Add a Template Sequence.
Using the dropdown, set the Bound Actor Class. For example, if this sequence will be used to animate a camera, set the class to Cine Camera Actor. This creates a spawnable camera actor.
As another example, when animating a character, you can set the Bound Actor Class to the character's Blueprint class. This creates a spawnable character actor.
Alternatively, you can also create a Camera Animation Sequence. This essentially creates a Template Sequence with the Bound Actor Class already set to the Cine Camera Actor.
Set your keyframes as you normally would in a sequence. For the Cine Camera Actor, key in the camera's transformations. You can also import other animations, such as a FBX animation, onto the transform track.
Playing the Template Sequence Animation in a Level Sequence
Once the Template Sequence is set up, you can use it in a Level Sequence.
Create a new Level Sequence or open an existing one.
Add a Cine Camera Actor to your level, and then add the camera as a track in your sequence.
On the camera track, select +Track > Camera Animation and select your template sequence. For non-camera actors, the template sequence can be found under Template Animation.
The sub-track menus are contextual, and only display Template Sequences with Bound Actor Classes that are compatible with the track. For example, trying to attach an animation meant for a camera onto a static mesh does not work, and the animation will not appear in the static mesh's sub-menu options.
The template sequence is now part of the sequence and will animate the actor that it was placed on. The template sequence is conceptually similar in this case to a skeletal animation clip playing on a character: it can be stretched, trimmed, looped, and so on.
Creating the Template Sequence as a Standalone Animation
You can play the Template Sequence animation by itself (without another level sequence), by creating a template sequence player and binding an actor of your choice to the player.
Open the Level Blueprint. Add the node Create Template Sequence Player.
Under the Template Sequence Asset drop-down, select the Template Sequence you previously created.
Call Set Binding from the player and connect the Out Actor to the Target pin.
from the World Outliner, drag and drop the CineCamera Actor into the Blueprint. Connect it to the Actor pin.
Lastly, call the Play To node and attach the Return Value from the Player node to the Play To target.
When executed, this Blueprint logic creates a new Template Sequence Actor and Template Sequence Player, binds them to an existing cine camera, and plays the animation from the specified Template Sequence onto the actor.
Using Blueprints to assign template sequences to actors is not contextual, unlike using the Tracks in Sequencer. This means you can attach actors and templates that do not align, which results in a runtime error and other unexpected results.