FSequenceInstance

A sequence instance represents a specific instance of a currently playing sequence, either as a top-level sequence in an [IMovieScenePlayer](API\Runtime\MovieScene\IMovieScenePlayer), or as a sub sequence.

Windows
MacOS
Linux

References

Module

MovieScene

Header

/Engine/Source/Runtime/MovieScene/Public/EntitySystem/MovieSceneSequenceInstance.h

Include

#include "EntitySystem/MovieSceneSequenceInstance.h"

Syntax

struct FSequenceInstance

Remarks

A sequence instance represents a specific instance of a currently playing sequence, either as a top-level sequence in an IMovieScenePlayer, or as a sub sequence. Any given sequence asset may have any number of instances created for it at any given time depending on how many times it is referenced by playing sequences

Variables

Name Description

Public variable

FEntityLedger

 

Ledger

Ledger that tracks all currently instantiated entities for this instance

Constructors

Name Description

Public function

FSequenceInstance

(
    const FSequenceInstance&
)

Sequence instances are not copyable

Public function

FSequenceInstance

(
    FSequenceInstance&&
)

Move constructors implemented in cpp to avoid includes for TUniquePtr

Public function

FSequenceInstance

(
    UMovieSceneEntitySystemLinker*...,
    IMovieScenePlayer* Player,
    FInstanceHandle ThisInstanceHandle
)

Constructor for top level sequences

Public function

FSequenceInstance

(
    UMovieSceneEntitySystemLinker*...,
    IMovieScenePlayer* Player,
    FInstanceHandle ThisInstanceHandle,
    FInstanceHandle RootInstanceHandle,
    FMovieSceneSequenceID InSequenceID,
    FMovieSceneCompiledDataID InCompile...
)

Constructor for sub sequences

Destructors

Name Description

Public function

~FSequenceInstance()

Destructor

Functions

Name Description

Public function

void

 

DestroyImmediately

Destroy this sequence instance immediately - Finish must previously have been called

Public function

void

 

DissectContext

(
    UMovieSceneEntitySystemLinker*...,
    const FMovieSceneContext& Context,
    TArray< TRange< FFrameTime >>& Out...
)

Called only for top-level sequence instances before any updates to it with the specified context.

Public function

void

 

EnableGlobalPreAnimatedStateCapture

Indicate that this sequence instance should capture any and all changes of state so they can be restored later

Public function Const

FMovieSceneE...

 

FindEntity

(
    UObject* Owner,
    uint32 EntityID
)

Attempt to locate an entity given its owner and ID

Public function Const

FInstanceHan...

 

FindSubInstance

(
    FMovieSceneSequenceID SequenceID
)

Attempt to locate a sub instance based on its sequence ID

Public function

void

 

Finish

Mark this instance as finished, causing all its entities to be unlinked and the instance to become inactive at the end of the next update.

Public function Const

const FMovie...

 

GetContext()

Get the evaluation context for the current frame

Public function Const

const FMovie...

 

GetLegacyEvaluator()

Retrieve the legacy evaluator for this sequence, if it is available (may return nullptr)

Public function Const

IMovieSceneP...

 

GetPlayer()

Retrieve the IMovieScenePlayer that is playing back the top level sequence for this instance

Public function Const

FInstanceHan...

 

GetRootInstanceHandle()

Get a handle to the root instance for this sub sequence instance

Public function Const

FMovieSceneS...

 

GetSequenceID()

Retrieve the SequenceID for this instance

Public function Const

uint16

 

GetSerialNumber()

Get the serial number for this sequence instance that it was created with on construction.

Public function Const

FSubSequence...

 

GetSubSequencePath()

Retrieve a path for this sequence instance back to the root

Public function Const

bool

 

HasEverUpdated()

Check whether this sequence instance has ever been updated or not

Public function Const

bool

 

HasFinished()

Check whether this sequence instance has finished evaluating

Public function

void

 

InvalidateCachedData

Invalidate any cached data that may be being used for evaluation due to a change in the source asset data

Public function Const

bool

 

IsCapturingGlobalPreAnimatedState()

Check whether this sequence instance is capturing any and all changes of state so they can be restored later

Public function Const

bool

 

IsRootSequence()

Returns whether this instance is the root instance.

Public function Const

bool

 

IsSubSequence()

Returns whether this instance is a sub sequence.

Public function

void

 

OverrideRootSequence

(
    UMovieSceneEntitySystemLinker*...,
    FMovieSceneSequenceID NewRootSequen...
)

Called to override the simulated root sequence ID for this instance.

Public function

void

 

PostEvaluation

Called when this sequence instance has been evaluated in order for it to do any clean-up or other post-update work

Public function

void

 

PreEvaluation

Called when this instance has been queued for evaluation in order for it to do any pre-work setup.

Public function

void

 

RunLegacyTrackTemplates()

Called to run legacy track templates

Public function

void

 

SetContext

(
    const FMovieSceneContext& InContex...
)

Get the evaluation context for the current frame

Public function

void

 

SetFinished

(
    bool bInFinished
)

Indicate that this sequence instance has finished evaluation and should remove its entities

Public function

void

 

Start

(
    UMovieSceneEntitySystemLinker*...,
    const FMovieSceneContext& InContex...
)

Called for root level instances that have either never evaluated, or have previously finished evaluating

Public function

void

 

Update

(
    UMovieSceneEntitySystemLinker*...,
    const FMovieSceneContext& InContex...
)

Called after dissection for root level instances in order for this sequence instacne to update any entities it needs for evaluation.

Operators

Name Description

Public function

FSequenceIns...

 

operator=

(
    const FSequenceInstance&
)

Public function

FSequenceIns...

 

operator=

(
    FSequenceInstance&&
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss