UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMovieScenePlaybackManager Class Reference

#include <MovieScenePlaybackManager.h>

Public Types

using FContexts = TArray< FMovieSceneContext, TInlineAllocator< 2 > >
 

Public Member Functions

MOVIESCENE_API FMovieScenePlaybackManager ()
 
MOVIESCENE_API FMovieScenePlaybackManager (UMovieSceneSequence *InSequence)
 
MOVIESCENE_API void Initialize (UMovieSceneSequence *InSequence)
 
MOVIESCENE_API void Update (float InDeltaSeconds, FContexts &OutContexts)
 
MOVIESCENE_API void UpdateTo (const FFrameTime NextTime, FContexts &OutContexts)
 
MOVIESCENE_API FMovieSceneContext UpdateToNextTick ()
 
MOVIESCENE_API FMovieSceneContext UpdateAtCurrentTime () const
 
MOVIESCENE_API FFrameTime GetCurrentTime () const
 
MOVIESCENE_API void SetCurrentTime (const FFrameTime &InFrameTime)
 
MOVIESCENE_API void SetCurrentTimeOffset (const FFrameTime &InFrameTimeOffset)
 
MOVIESCENE_API TRange< FFrameTimeGetEffectivePlaybackRange () const
 
MOVIESCENE_API FFrameTime GetEffectiveStartTime () const
 
MOVIESCENE_API FFrameTime GetEffectiveEndTime () const
 
FFrameRate GetDisplayRate () const
 
FFrameRate GetTickResolution () const
 
EMovieSceneLoopDissection GetDissectLooping () const
 
void SetDissectLooping (EMovieSceneLoopDissection InDissectLooping)
 
EMovieScenePlayerStatus::Type GetPlaybackStatus () const
 
void SetPlaybackStatus (EMovieScenePlayerStatus::Type InPlaybackStatus)
 
int32 GetNumLoopsToPlay () const
 
MOVIESCENE_API void SetNumLoopsToPlay (int32 InNumLoopsToPlay)
 
int32 GetNumLoopsCompleted () const
 
void ResetNumLoopsCompleted ()
 
double GetPlayRate () const
 
void SetPlayRate (double InPlayRate)
 
bool IsPlayingForward () const
 
bool IsPlayingBackward () const
 
EPlayDirection GetPlayDirection () const
 
void SetPlayDirection (EPlayDirection InPlayDirection)
 
MOVIESCENE_API void ReversePlayDirection ()
 
bool IsPingPongPlayback () const
 
MOVIESCENE_API void SetPingPongPlayback (bool bInPingPongPlayback)
 
MOVIESCENE_API FFrameTime GetStartOffset () const
 
MOVIESCENE_API FFrameTime GetEndOffset () const
 
MOVIESCENE_API void SetStartOffset (const FFrameTime &InStartOffset)
 
MOVIESCENE_API void SetEndOffset (const FFrameTime &InEndOffset)
 
MOVIESCENE_API void SetEndOffsetAsTime (const FFrameTime &InEndTime)
 
MOVIESCENE_API TOptional< FFrameTimeGetPlaybackEndTime () const
 
MOVIESCENE_API void SetPlaybackEndTime (const FFrameTime &InEndTime)
 
MOVIESCENE_API void ClearPlaybackEndTime ()
 
bool ShouldTransformPlaybackTime () const
 
void SetTransformPlaybackTime (bool bInTransformPlaybackTime)
 
const FMovieSceneSequenceTransformGetPlaybackTimeTransform () const
 
void SetPlaybackTimeTransform (const FMovieSceneSequenceTransform &InTimeTransform)
 

Detailed Description

A utility class that can manage a playing sequence's status and current time, while also handling looping, ping-ponging, and other playback modes.

All public APIs take and return times in display rate (e.g. 30fps frames). Internally, everything is treated as ticks (e.g. 60000 ticks/sec).

Member Typedef Documentation

◆ FContexts

Constructor & Destructor Documentation

◆ FMovieScenePlaybackManager() [1/2]

FMovieScenePlaybackManager::FMovieScenePlaybackManager ( )

Creates a default playback manager.

◆ FMovieScenePlaybackManager() [2/2]

FMovieScenePlaybackManager::FMovieScenePlaybackManager ( UMovieSceneSequence InSequence)

Creates a playback manager immediately initialized with the given sequence.

Member Function Documentation

◆ ClearPlaybackEndTime()

void FMovieScenePlaybackManager::ClearPlaybackEndTime ( )

Removes any previously specified time to stop at.

◆ GetCurrentTime()

FFrameTime FMovieScenePlaybackManager::GetCurrentTime ( ) const

Gets the current playback position, in display rate.

◆ GetDisplayRate()

FFrameRate FMovieScenePlaybackManager::GetDisplayRate ( ) const
inline

Gets the display rate of the sequence.

◆ GetDissectLooping()

EMovieSceneLoopDissection FMovieScenePlaybackManager::GetDissectLooping ( ) const
inline

Gets whether looping dissection is enabled (see EMovieSceneLoopDissection).

◆ GetEffectiveEndTime()

FFrameTime FMovieScenePlaybackManager::GetEffectiveEndTime ( ) const

Get the effective playback end time, in display rate, taking into account any end offset.

◆ GetEffectivePlaybackRange()

TRange< FFrameTime > FMovieScenePlaybackManager::GetEffectivePlaybackRange ( ) const

Get the effective playback range, in display rate, taking into account start/end offsets.

◆ GetEffectiveStartTime()

FFrameTime FMovieScenePlaybackManager::GetEffectiveStartTime ( ) const

Get the effective playback start time, in display rate, taking into account any start offset.

◆ GetEndOffset()

FFrameTime FMovieScenePlaybackManager::GetEndOffset ( ) const

Gets the end offset of the playback in display rate.

◆ GetNumLoopsCompleted()

int32 FMovieScenePlaybackManager::GetNumLoopsCompleted ( ) const
inline

Returns the current number of loops completed so far.

◆ GetNumLoopsToPlay()

int32 FMovieScenePlaybackManager::GetNumLoopsToPlay ( ) const
inline

Gets the number of loops to play before ending playback.

◆ GetPlaybackEndTime()

TOptional< FFrameTime > FMovieScenePlaybackManager::GetPlaybackEndTime ( ) const

Gets the time to stop at on the last loop of playback.

◆ GetPlaybackStatus()

EMovieScenePlayerStatus::Type FMovieScenePlaybackManager::GetPlaybackStatus ( ) const
inline

Get the playback status.

◆ GetPlaybackTimeTransform()

const FMovieSceneSequenceTransform & FMovieScenePlaybackManager::GetPlaybackTimeTransform ( ) const
inline

Gets the time transform to apply to the current time when updating. Only used if ShouldTransformPlaybackTime is true.

◆ GetPlayDirection()

EPlayDirection FMovieScenePlaybackManager::GetPlayDirection ( ) const
inline

Gets the playback direction.

◆ GetPlayRate()

double FMovieScenePlaybackManager::GetPlayRate ( ) const
inline

Gets the play-rate.

◆ GetStartOffset()

FFrameTime FMovieScenePlaybackManager::GetStartOffset ( ) const

Gets the start offset of the playback in display rate.

◆ GetTickResolution()

FFrameRate FMovieScenePlaybackManager::GetTickResolution ( ) const
inline

Gets the tick resolution of the sequence.

◆ Initialize()

void FMovieScenePlaybackManager::Initialize ( UMovieSceneSequence InSequence)

Initializes the playback manager for the given sequence. This resets all playback settings (play rate, start/end offsets, etc.) to their default values.

◆ IsPingPongPlayback()

bool FMovieScenePlaybackManager::IsPingPongPlayback ( ) const
inline

Gets whether the sequence should ping-pong between forwards and backwards playback.

◆ IsPlayingBackward()

bool FMovieScenePlaybackManager::IsPlayingBackward ( ) const
inline

Gets whether the sequence should be playing in reverse.

◆ IsPlayingForward()

bool FMovieScenePlaybackManager::IsPlayingForward ( ) const
inline

Gets whether the sequence should be playing forwards.

◆ ResetNumLoopsCompleted()

void FMovieScenePlaybackManager::ResetNumLoopsCompleted ( )
inline

Reset the number of completed loops to zero.

◆ ReversePlayDirection()

void FMovieScenePlaybackManager::ReversePlayDirection ( )

Reverses the playback direction.

◆ SetCurrentTime()

void FMovieScenePlaybackManager::SetCurrentTime ( const FFrameTime InFrameTime)

Sets the current playback position, in display rate.

◆ SetCurrentTimeOffset()

void FMovieScenePlaybackManager::SetCurrentTimeOffset ( const FFrameTime InFrameTimeOffset)

Sets the current playback position, in display rate, as an offset from the effective start time.

◆ SetDissectLooping()

void FMovieScenePlaybackManager::SetDissectLooping ( EMovieSceneLoopDissection  InDissectLooping)
inline

Sets whether looping dissection is enabled (see EMovieSceneLoopDissection).

◆ SetEndOffset()

void FMovieScenePlaybackManager::SetEndOffset ( const FFrameTime InEndOffset)

Sets the end offset of the playback in display rate.

◆ SetEndOffsetAsTime()

void FMovieScenePlaybackManager::SetEndOffsetAsTime ( const FFrameTime InEndTime)

Sets the end time of the playback in display rate.

◆ SetNumLoopsToPlay()

void FMovieScenePlaybackManager::SetNumLoopsToPlay ( int32  InNumLoopsToPlay)

Sets the number of loops to play before ending playback.

◆ SetPingPongPlayback()

void FMovieScenePlaybackManager::SetPingPongPlayback ( bool  bInPingPongPlayback)

Sets whether the sequence should ping-pong between forwards and backwards playback. Note that a "loop" is still one play through of the sequence, whether forwards or backwards, so odd numbers of loops corresponds to a "ping" without a "pong".

◆ SetPlaybackEndTime()

void FMovieScenePlaybackManager::SetPlaybackEndTime ( const FFrameTime InEndTime)

Sets the time to stop at on the last loop of playback.

◆ SetPlaybackStatus()

void FMovieScenePlaybackManager::SetPlaybackStatus ( EMovieScenePlayerStatus::Type  InPlaybackStatus)
inline

Set the playback status.

◆ SetPlaybackTimeTransform()

void FMovieScenePlaybackManager::SetPlaybackTimeTransform ( const FMovieSceneSequenceTransform InTimeTransform)
inline

◆ SetPlayDirection()

void FMovieScenePlaybackManager::SetPlayDirection ( EPlayDirection  InPlayDirection)
inline

Sets the playback direction.

◆ SetPlayRate()

void FMovieScenePlaybackManager::SetPlayRate ( double  InPlayRate)
inline

Sets the play-rate.

◆ SetStartOffset()

void FMovieScenePlaybackManager::SetStartOffset ( const FFrameTime InStartOffset)

Sets the start offset of the playback in display rate.

◆ SetTransformPlaybackTime()

void FMovieScenePlaybackManager::SetTransformPlaybackTime ( bool  bInTransformPlaybackTime)
inline

Sets whether the playback time transform should be applied to time updates.

◆ ShouldTransformPlaybackTime()

bool FMovieScenePlaybackManager::ShouldTransformPlaybackTime ( ) const
inline

Gets whether the playback time transform should be applied to time updates.

◆ Update()

void FMovieScenePlaybackManager::Update ( float  InDeltaSeconds,
FContexts OutContexts 
)

Updates the playback state and returns the evaluation contexts to use for evaluating the sequence. More than one context may be returned if the sequence loops once or more, and "looping dissection" is enabled.

Parameters
InDeltaSecondsThe delta-time to update with
OutContextsOne or more update contexts to evaluate the sequence

◆ UpdateAtCurrentTime()

FMovieSceneContext FMovieScenePlaybackManager::UpdateAtCurrentTime ( ) const

Returns an evaluation context for the current time, i.e. using a zero-width evaluation range set around the current time.

◆ UpdateTo()

void FMovieScenePlaybackManager::UpdateTo ( const FFrameTime  NextTime,
FContexts OutContexts 
)

As per the other Update method, but takes a time (in display rate) instead of seconds.

◆ UpdateToNextTick()

FMovieSceneContext FMovieScenePlaybackManager::UpdateToNextTick ( )

Updates the playback state over only the current tick. This generally does not advance the current time by one tick, but by one tick bound. That is, if the current time is tick 0, this will evaluate the [0, 0] range, advancing to an exclusive lower bound, so that the next update will be (0, XYZ).


The documentation for this class was generated from the following files: