Component Timeline

Author: Tomasz Klin
Version: 1.2.1

Enabling Plugin

In order to enable the plugin go to Edit -> Plugins, select Blueprints category, and check Enabled for Component Timeline

Component Timeline enabled in the Blueprints category of the Plugins window

Adding Timeline node

Right-click in a component blueprint and type Add Component Timeline

Adding a Component Timeline node from the blueprint context menu

Initializing Timelines (Very Important!!!)

To ensure that your timelines function properly, they must be initialized at the beginning of your component's operation. Without initialization, the timelines will not work as intended. To initialize your component timelines, call "Initialize Component Timelines" during Begin Play.

Initialize Component Timelines called from the component's Begin Play

Component timeline node

A Component Timeline node with its input and output pins

Component Timeline nodes are special nodes within Blueprints that provide time-based animation to be quickly designed and played back based on events, floats, vectors, or colors that can be triggered at keyframes along the timeline.

Timelines can be edited directly inside the Blueprint editor by Double-clicking on the Timeline in the Graph tab or in the My Blueprint tab. They are specifically built for handling simple, non-cinematic tasks such as opening doors, altering lights, or performing other time-centric manipulations to Actors within a scene. They are similar to level sequences as they both provide values such as floats, vectors, and colors to be interpolated between keyframes along the timeline.

Inputs and Outputs

Timelines come with the following input and output pins:

Input Pins

ItemDescription
PlayCauses the Timeline to play forward from its current time.
Play from StartCauses the Timeline to play forward from the beginning.
StopFreezes the playback of the Timeline at the current time.
ReversePlays the Timeline backwards from its current time.
Reverse from EndPlays the Timeline backwards starting from the end.
Set New TimeSets the current time to the value set (or input) in the New Time input.
New TimeThis data pin takes a float value representing time in seconds, to which the Timeline can jump when the Set New Time input is called.

Output Pins

ItemDescription
UpdateOutputs an execution signal as soon as the Timeline is called.
FinishedOutputs an execution signal when playback ends. This is not triggered by the Stop function.
DirectionOutputs enum data indicating the direction the Timeline is playing.

Timelines may have any number of additional output data pins reflecting the types of tracks created within them. These include Float, Vector, and Event tracks.

Timeline in other blueprints (experimental)

This is an experimental feature, added at the request of one of the users. I have made every effort to make it work well, but I am not able to anticipate all use cases. It should not be used if one does not understand all the limitations it imposes.

How does it work?

The timeline functionality is implemented by the TimelineComponent, so in order to use it, we need an actor for which we can create the component.

The lifespan of the blueprint in which we place the timeline and the actor that manages it should be related. For example, timelines used in widgets on the screen can be linked to the HUD, which is an actor.

It is also not a good practice to use PlayerPawn as a solution for everything. In most cases, it will work, but it will create a lot of clutter in the PlayerPawn.

Enable timelines in all blueprints

By default, this functionality is disabled. To enable it, you need to check the "Enable timelines in all blueprints" option in Project settings, under Plugins -> Component Timeline.

The Enable timelines in all blueprints option in Project settings

The option only takes effect after the editor is restarted, so restart it before looking for the node.

How to use it?

To use the timeline functionality, you can insert a timeline into a blueprint as usual. Then, you can initialize the timelines in the blueprint's event that begins blueprint work (e.g. BeginPlay/Construct) using the "Initialize Timelines" node. Give that node the actor that is to own the timelines - the one whose lifespan the blueprint's own follows.

Initialize Timelines called with the owning actor