UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMovieSceneSpawnRegister Class Referenceabstract

#include <MovieSceneSpawnRegister.h>

+ Inheritance diagram for FMovieSceneSpawnRegister:

Classes

struct  FMovieSceneSpawnRegisterKey
 
struct  FSpawnedObject
 

Public Types

using FSharedPlaybackState = UE::MovieScene::FSharedPlaybackState
 

Public Member Functions

MOVIESCENE_API FMovieSceneSpawnRegister ()
 
MOVIESCENE_API FMovieSceneSpawnRegister (const FMovieSceneSpawnRegister &)
 
virtual MOVIESCENE_API ~FMovieSceneSpawnRegister ()
 
MOVIESCENE_API TWeakObjectPtr FindSpawnedObject (const FGuid &BindingId, FMovieSceneSequenceIDRef TemplateID, int BindingIndex) const
 
virtual MOVIESCENE_API UObjectSpawnObject (const FGuid &BindingId, UMovieScene &MovieScene, FMovieSceneSequenceIDRef Template, TSharedRef< const FSharedPlaybackState > SharedPlaybackState, int32 BindingIndex)
 
MOVIESCENE_API bool DestroySpawnedObject (const FGuid &BindingId, FMovieSceneSequenceIDRef TemplateID, TSharedRef< const FSharedPlaybackState > SharedPlaybackState, int32 BindingIndex)
 
void DestroyObjectDirectly (UObject &InObject)
 
MOVIESCENE_API void DestroyObjectsByPredicate (TSharedRef< const FSharedPlaybackState > SharedPlaybackState, const TFunctionRef< bool(const FGuid &, ESpawnOwnership, FMovieSceneSequenceIDRef, int32)> &Predicate)
 
MOVIESCENE_API void ForgetExternallyOwnedSpawnedObjects (TSharedRef< const FSharedPlaybackState > SharedPlaybackState)
 
MOVIESCENE_API void CleanUp (TSharedRef< const FSharedPlaybackState > SharedPlaybackState)
 
MOVIESCENE_API void CleanUpSequence (FMovieSceneSequenceIDRef TemplateID, TSharedRef< const FSharedPlaybackState > SharedPlaybackState)
 
MOVIESCENE_API void OnSequenceExpired (FMovieSceneSequenceIDRef TemplateID, TSharedRef< const FSharedPlaybackState > SharedPlaybackState)
 
TWeakObjectPtr FindSpawnedObject (const FGuid &BindingId, FMovieSceneSequenceIDRef TemplateID) const
 
virtual UObjectSpawnObject (const FGuid &BindingId, UMovieScene &MovieScene, FMovieSceneSequenceIDRef Template, TSharedRef< const FSharedPlaybackState > SharedPlaybackState)
 
bool DestroySpawnedObject (const FGuid &BindingId, FMovieSceneSequenceIDRef TemplateID, TSharedRef< const FSharedPlaybackState > SharedPlaybackState)
 
MOVIESCENE_API UObjectSpawnObject (const FGuid &BindingId, UMovieScene &MovieScene, FMovieSceneSequenceIDRef Template, IMovieScenePlayer &Player)
 
MOVIESCENE_API bool DestroySpawnedObject (const FGuid &BindingId, FMovieSceneSequenceIDRef TemplateID, IMovieScenePlayer &Player)
 
MOVIESCENE_API void DestroyObjectsByPredicate (TSharedRef< const FSharedPlaybackState > SharedPlaybackState, const TFunctionRef< bool(const FGuid &, ESpawnOwnership, FMovieSceneSequenceIDRef)> &Predicate)
 
MOVIESCENE_API void DestroyObjectsByPredicate (IMovieScenePlayer &Player, const TFunctionRef< bool(const FGuid &, ESpawnOwnership, FMovieSceneSequenceIDRef)> &Predicate)
 
MOVIESCENE_API void ForgetExternallyOwnedSpawnedObjects (FMovieSceneEvaluationState &State, IMovieScenePlayer &Player)
 
MOVIESCENE_API void CleanUp (IMovieScenePlayer &Player)
 
MOVIESCENE_API void CleanUpSequence (FMovieSceneSequenceIDRef TemplateID, IMovieScenePlayer &Player)
 
MOVIESCENE_API void OnSequenceExpired (FMovieSceneSequenceIDRef TemplateID, IMovieScenePlayer &Player)
 
- Public Member Functions inherited from TSharedFromThis< FMovieSceneSpawnRegister >
TSharedRef< FMovieSceneSpawnRegister, Mode > AsShared ()
 
TSharedRef< FMovieSceneSpawnRegister const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FMovieSceneSpawnRegister, Mode > AsWeak ()
 
TWeakPtr< FMovieSceneSpawnRegister const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Protected Member Functions

virtual UObjectSpawnObject (FMovieSceneSpawnable &Spawnable, FMovieSceneSequenceIDRef TemplateID, TSharedRef< const FSharedPlaybackState > SharedPlaybackState)=0
 
virtual MOVIESCENE_API void PreDestroyObject (UObject &Object, const FGuid &BindingId, FMovieSceneSequenceIDRef TemplateID)
 
virtual void PreDestroyObject (UObject &Object, const FGuid &BindingId, int32 BindingIndex, FMovieSceneSequenceIDRef TemplateID)
 
virtual void DestroySpawnedObject (UObject &Object)
 
virtual void DestroySpawnedObject (UObject &Object, UMovieSceneSpawnableBindingBase *CustomSpawnableBinding)=0
 
- Protected Member Functions inherited from TSharedFromThis< FMovieSceneSpawnRegister >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 

Protected Attributes

TMap< FMovieSceneSpawnRegisterKey, FSpawnedObjectRegister
 
bool bCleaningUp = false
 

Additional Inherited Members

- Static Protected Member Functions inherited from TSharedFromThis< FMovieSceneSpawnRegister >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Detailed Description

Class responsible for managing spawnables in a movie scene

Member Typedef Documentation

◆ FSharedPlaybackState

Constructor & Destructor Documentation

◆ FMovieSceneSpawnRegister() [1/2]

FMovieSceneSpawnRegister::FMovieSceneSpawnRegister ( )
default

◆ FMovieSceneSpawnRegister() [2/2]

FMovieSceneSpawnRegister::FMovieSceneSpawnRegister ( const FMovieSceneSpawnRegister )
default

◆ ~FMovieSceneSpawnRegister()

FMovieSceneSpawnRegister::~FMovieSceneSpawnRegister ( )
virtualdefault

Virtual destructor

Member Function Documentation

◆ CleanUp() [1/2]

void FMovieSceneSpawnRegister::CleanUp ( IMovieScenePlayer Player)

◆ CleanUp() [2/2]

void FMovieSceneSpawnRegister::CleanUp ( TSharedRef< const FSharedPlaybackState SharedPlaybackState)

Called to indiscriminately clean up any spawned objects

◆ CleanUpSequence() [1/2]

void FMovieSceneSpawnRegister::CleanUpSequence ( FMovieSceneSequenceIDRef  TemplateID,
IMovieScenePlayer Player 
)

◆ CleanUpSequence() [2/2]

void FMovieSceneSpawnRegister::CleanUpSequence ( FMovieSceneSequenceIDRef  TemplateID,
TSharedRef< const FSharedPlaybackState SharedPlaybackState 
)

Called to clean up any non-externally owned spawnables that were spawned from the specified instance

◆ DestroyObjectDirectly()

void FMovieSceneSpawnRegister::DestroyObjectDirectly ( UObject InObject)
inline

Destroy a specific previously spawned object, where its binding ID and sequence ID is not known.

Note
Should only be used for restoring pre-animated state, or where it is otherwise impossible to call DestroySpawnedObject
Parameters
InObjectthe object to destroy

◆ DestroyObjectsByPredicate() [1/3]

void FMovieSceneSpawnRegister::DestroyObjectsByPredicate ( IMovieScenePlayer Player,
const TFunctionRef< bool(const FGuid &, ESpawnOwnership, FMovieSceneSequenceIDRef)> &  Predicate 
)

◆ DestroyObjectsByPredicate() [2/3]

void FMovieSceneSpawnRegister::DestroyObjectsByPredicate ( TSharedRef< const FSharedPlaybackState SharedPlaybackState,
const TFunctionRef< bool(const FGuid &, ESpawnOwnership, FMovieSceneSequenceIDRef)> &  Predicate 
)

◆ DestroyObjectsByPredicate() [3/3]

void FMovieSceneSpawnRegister::DestroyObjectsByPredicate ( TSharedRef< const FSharedPlaybackState SharedPlaybackState,
const TFunctionRef< bool(const FGuid &, ESpawnOwnership, FMovieSceneSequenceIDRef, int32)> &  Predicate 
)

Destroy spawned objects using a custom predicate

Parameters
PlayerMovie scene player that is ultimately responsible for destroying the objects
PredicatePredicate used for testing whether an object should be destroyed. Returns true for destruction, false to skip.

◆ DestroySpawnedObject() [1/5]

bool FMovieSceneSpawnRegister::DestroySpawnedObject ( const FGuid BindingId,
FMovieSceneSequenceIDRef  TemplateID,
IMovieScenePlayer Player 
)

◆ DestroySpawnedObject() [2/5]

bool FMovieSceneSpawnRegister::DestroySpawnedObject ( const FGuid BindingId,
FMovieSceneSequenceIDRef  TemplateID,
TSharedRef< const FSharedPlaybackState SharedPlaybackState 
)
inline

◆ DestroySpawnedObject() [3/5]

MOVIESCENE_API bool FMovieSceneSpawnRegister::DestroySpawnedObject ( const FGuid BindingId,
FMovieSceneSequenceIDRef  TemplateID,
TSharedRef< const FSharedPlaybackState SharedPlaybackState,
int32  BindingIndex 
)

Destroy a specific previously spawned object

Parameters
BindingIdID of the object to destroy
TemplateIDIdentifier for the current template we're evaluating
PlayerMovie scene player that is ultimately responsible for destroying the object
BindingIndexFor level sequences using custom spawnable bindings, the index of the binding reference.
Returns
True if an object was destroyed, false otherwise The version without the binding index is to support old clients of the previous API

◆ DestroySpawnedObject() [4/5]

virtual void FMovieSceneSpawnRegister::DestroySpawnedObject ( UObject Object)
inlineprotectedvirtual

◆ DestroySpawnedObject() [5/5]

virtual void FMovieSceneSpawnRegister::DestroySpawnedObject ( UObject Object,
UMovieSceneSpawnableBindingBase CustomSpawnableBinding 
)
protectedpure virtual

Destroy a specific previously spawned object

Parameters
ObjectThe object to destroy
CustomSpawnableBindingOptional custom spawnable binding to handle the destroy.

Implemented in FNullMovieSceneSpawnRegister, and FLevelSequenceSpawnRegister.

◆ FindSpawnedObject() [1/2]

TWeakObjectPtr FMovieSceneSpawnRegister::FindSpawnedObject ( const FGuid BindingId,
FMovieSceneSequenceIDRef  TemplateID 
) const
inline

◆ FindSpawnedObject() [2/2]

TWeakObjectPtr FMovieSceneSpawnRegister::FindSpawnedObject ( const FGuid BindingId,
FMovieSceneSequenceIDRef  TemplateID,
int  BindingIndex 
) const

Attempt to find a previously spawned object represented by the specified object and template IDs

Parameters
BindingIdID of the object to find
TemplateIDUnique ID of the template to look within
BindingIndexFor level sequences using custom spawnable bindings, the index of the binding reference.
Returns
The spawned object if found; nullptr otherwise. The version without the binding index is to support old clients of the previous API

◆ ForgetExternallyOwnedSpawnedObjects() [1/2]

void FMovieSceneSpawnRegister::ForgetExternallyOwnedSpawnedObjects ( FMovieSceneEvaluationState State,
IMovieScenePlayer Player 
)

◆ ForgetExternallyOwnedSpawnedObjects() [2/2]

void FMovieSceneSpawnRegister::ForgetExternallyOwnedSpawnedObjects ( TSharedRef< const FSharedPlaybackState SharedPlaybackState)

Purge any memory of any objects that are considered externally owned

Parameters
PlayerMovie scene player that is ultimately responsible for destroying the objects

◆ OnSequenceExpired() [1/2]

void FMovieSceneSpawnRegister::OnSequenceExpired ( FMovieSceneSequenceIDRef  TemplateID,
IMovieScenePlayer Player 
)

◆ OnSequenceExpired() [2/2]

void FMovieSceneSpawnRegister::OnSequenceExpired ( FMovieSceneSequenceIDRef  TemplateID,
TSharedRef< const FSharedPlaybackState SharedPlaybackState 
)

Called when the current time has moved beyond the specified sequence's play range

◆ PreDestroyObject() [1/2]

void FMovieSceneSpawnRegister::PreDestroyObject ( UObject Object,
const FGuid BindingId,
FMovieSceneSequenceIDRef  TemplateID 
)
protectedvirtual

Called right before a spawned object with the specified ID and template ID is destroyed

◆ PreDestroyObject() [2/2]

virtual void FMovieSceneSpawnRegister::PreDestroyObject ( UObject Object,
const FGuid BindingId,
int32  BindingIndex,
FMovieSceneSequenceIDRef  TemplateID 
)
inlineprotectedvirtual

◆ SpawnObject() [1/4]

UObject * FMovieSceneSpawnRegister::SpawnObject ( const FGuid BindingId,
UMovieScene MovieScene,
FMovieSceneSequenceIDRef  Template,
IMovieScenePlayer Player 
)

◆ SpawnObject() [2/4]

virtual UObject * FMovieSceneSpawnRegister::SpawnObject ( const FGuid BindingId,
UMovieScene MovieScene,
FMovieSceneSequenceIDRef  Template,
TSharedRef< const FSharedPlaybackState SharedPlaybackState 
)
inlinevirtual

◆ SpawnObject() [3/4]

virtual MOVIESCENE_API UObject * FMovieSceneSpawnRegister::SpawnObject ( const FGuid BindingId,
UMovieScene MovieScene,
FMovieSceneSequenceIDRef  Template,
TSharedRef< const FSharedPlaybackState SharedPlaybackState,
int32  BindingIndex 
)
virtual

Spawn an object for the specified GUID, from the specified sequence instance.

Parameters
BindingIdID of the object to spawn
TemplateIDIdentifier for the current template we're evaluating
PlayerMovie scene player that is ultimately responsible for spawning the object
BindingIndexFor level sequences using custom spawnable bindings, the index of the binding reference.
Returns
the spawned object, or nullptr on failure The version without the binding index is to support old clients of the previous API

◆ SpawnObject() [4/4]

virtual UObject * FMovieSceneSpawnRegister::SpawnObject ( FMovieSceneSpawnable Spawnable,
FMovieSceneSequenceIDRef  TemplateID,
TSharedRef< const FSharedPlaybackState SharedPlaybackState 
)
protectedpure virtual

Spawn an object for the specified GUID, from the specified sequence instance.

Parameters
ObjectID of the object to spawn
TemplateIDIdentifier for the current template we're evaluating
PlayerMovie scene player that is ultimately responsible for spawning the object
Returns
the spawned object, or nullptr on failure

Implemented in FNullMovieSceneSpawnRegister, and FLevelSequenceSpawnRegister.

Member Data Documentation

◆ bCleaningUp

bool FMovieSceneSpawnRegister::bCleaningUp = false
protected

True when cleaning ourselves up. Used to bypass marking a sequence dirty when objects are modified since we're cleaning ourselves up

◆ Register

TMap<FMovieSceneSpawnRegisterKey, FSpawnedObject> FMovieSceneSpawnRegister::Register
protected

Register of spawned objects


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