UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MovieSceneSpawnableBinding.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
8#include "MovieSceneSpawnableBinding.generated.h"
9
10#define UE_API MOVIESCENE_API
11
12namespace UE
13{
14 namespace MovieScene
15 {
16 struct FSharedPlaybackState;
17 }
18}
19struct FGuid;
20class UMovieScene;
21struct FSlateBrush;
22
30UCLASS(MinimalAPI, abstract)
33{
34public:
35
37
38public:
39
40 /* Called by the Movie Scene Spawner for this spawnable binding to spawn its object. */
41 UE_API virtual UObject* SpawnObject(const FGuid& BindingId, int32 BindingIndex, UMovieScene& MovieScene, FMovieSceneSequenceIDRef TemplateID, TSharedRef<const UE::MovieScene::FSharedPlaybackState> SharedPlaybackState);
42
43 /* Called by the Movie Scene Spawner right before a spawned object with the specified ID and template ID is destroyed*/
44 virtual void PreDestroyObject(UObject* Object, const FGuid& BindingId, int32 BindingIndex, FMovieSceneSequenceIDRef TemplateID) {}
45
46 /* Called by the Movie Scene Spawner to destroy this previously spawned object */
47 UE_API virtual void DestroySpawnedObject(UObject* Object);
48
49 // Optional interface functions for spawnables that support object templates.
50
51 /* Override and return true if the binding type supports object templates */
52 virtual bool SupportsObjectTemplates() const { return false; }
53
54 /* Override and return the object template if the binding type supports object templates*/
55 virtual UObject* GetObjectTemplate() { return nullptr; }
56
62
67
68public:
69 /*
70 * The spawn ownership setting for this spawnable, allowing spawnables to potentially outlast the lifetime of their sub sequence or sequence altogether.
71 */
72 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Spawnable)
74
76 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= Spawnable)
77 bool bContinuouslyRespawn = false;
78
79public:
80
81#if WITH_EDITOR
82 /* UMovieSceneCustomBinding overrides */
83 UE_API virtual void SetupDefaults(UObject* SpawnedObject, FGuid ObjectBindingId, UMovieScene& OwnerMovieScene) override;
84 UE_API virtual FSlateIcon GetBindingTrackCustomIconOverlay() const override;
85 UE_API virtual FText GetBindingTrackIconTooltip() const override;
86#endif
87protected:
88
89
90 /* Must be overridden. Handles the actual spawning of the object. Is overridden by UMovieSceneSpawnableActorBindingBase for example to handle actor-specific spawning. */
92
93 /* Must be overridden. Handles the actual destruction of the object. Is overridden by UMovieSceneSpawnableActorBindingBase for example to handle actor-specific destruction.*/
95
96 // Helper functions used by various base implementations- can be overridden to customize spawn behavior.
97
98 /* By default, objects will be spawned in Sequencer's current world context. However, derived classes can override for more specialized behavior*/
99 UE_API virtual UWorld* GetWorldContext(TSharedRef<const UE::MovieScene::FSharedPlaybackState> SharedPlaybackState) const;
100
101 /* Should returns the name of the object to be spawned if a custom name desired. If not specified, defaults to creating a unique name from the object class. */
103
104 /* Can be used by derived classes to perform custom post spawn setup on an object. */
105 virtual void PostSpawnObject(UObject* SpawnedObject, UWorld* WorldContext, const FGuid& BindingId, int32 BindingIndex, UMovieScene& MovieScene, FMovieSceneSequenceIDRef TemplateID, TSharedRef<const UE::MovieScene::FSharedPlaybackState> SharedPlaybackState) {}
106
107protected:
108
109private:
110 // Allows Replaceables to access private functions of their inner spawnables.
112
113 /* UMovieSceneCustomBinding overrides*/
114 bool WillSpawnObject(TSharedRef<const UE::MovieScene::FSharedPlaybackState> SharedPlaybackState) const override final { return true; }
117};
118
119#undef UE_API
#define PURE_VIRTUAL(func,...)
Definition CoreMiscDefines.h:103
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
TCallTraits< FMovieSceneSequenceID >::ParamType FMovieSceneSequenceIDRef
Definition MovieSceneSequenceID.h:93
#define UE_API
Definition MovieSceneSpawnableBinding.h:10
ESpawnOwnership
Definition MovieSceneSpawnable.h:23
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition NameTypes.h:617
Definition Text.h:385
Definition MovieScene.Build.cs:6
Definition SharedPointer.h:153
Definition MovieSceneCustomBinding.h:62
virtual FMovieSceneBindingResolveResult ResolveBinding(const FMovieSceneBindingResolveParams &ResolveParams, int32 BindingIndex, TSharedRef< const UE::MovieScene::FSharedPlaybackState > SharedPlaybackState) const PURE_VIRTUAL(UMovieSceneCustomBinding
Definition MovieSceneCustomBinding.h:79
Definition MovieSceneReplaceableBinding.h:35
UE_API const UMovieSceneSpawnableBindingBase * AsSpawnable(TSharedRef< const UE::MovieScene::FSharedPlaybackState > SharedPlaybackState) const override final
Definition MovieSceneReplaceableBinding.cpp:133
UE_API bool WillSpawnObject(TSharedRef< const UE::MovieScene::FSharedPlaybackState > SharedPlaybackState) const override final
Definition MovieSceneReplaceableBinding.cpp:88
Definition MovieSceneSequence.h:73
Definition MovieSceneSpawnableBinding.h:33
virtual FName GetSpawnName(const FGuid &BindingId, UMovieScene &MovieScene, FMovieSceneSequenceIDRef TemplateID, TSharedRef< const UE::MovieScene::FSharedPlaybackState > SharedPlaybackState) const
Definition MovieSceneSpawnableBinding.h:102
virtual UObject * GetObjectTemplate()
Definition MovieSceneSpawnableBinding.h:55
virtual void PreDestroyObject(UObject *Object, const FGuid &BindingId, int32 BindingIndex, FMovieSceneSequenceIDRef TemplateID)
Definition MovieSceneSpawnableBinding.h:44
virtual void CopyObjectTemplate(UObject *InSourceObject, UMovieSceneSequence &MovieSceneSequence)
Definition MovieSceneSpawnableBinding.h:66
virtual UObject * SpawnObjectInternal(UWorld *WorldContext, FName SpawnName, const FGuid &BindingId, int32 BindingIndex, UMovieScene &MovieScene, FMovieSceneSequenceIDRef TemplateID, TSharedRef< const UE::MovieScene::FSharedPlaybackState > SharedPlaybackState) PURE_VIRTUAL(UMovieSceneSpawnableBindingBase
Definition MovieSceneSpawnableBinding.h:91
virtual bool SupportsObjectTemplates() const
Definition MovieSceneSpawnableBinding.h:52
virtual void SetObjectTemplate(UObject *InObjectTemplate)
Definition MovieSceneSpawnableBinding.h:61
virtual void PostSpawnObject(UObject *SpawnedObject, UWorld *WorldContext, const FGuid &BindingId, int32 BindingIndex, UMovieScene &MovieScene, FMovieSceneSequenceIDRef TemplateID, TSharedRef< const UE::MovieScene::FSharedPlaybackState > SharedPlaybackState)
Definition MovieSceneSpawnableBinding.h:105
virtual void DestroySpawnedObjectInternal(UObject *Object) PURE_VIRTUAL(UMovieSceneSpawnableBindingBase
Definition MovieSceneSpawnableBinding.h:94
Definition MovieScene.h:358
Definition Object.h:95
Definition World.h:918
Definition AdvancedWidgetsModule.cpp:13
@ false
Definition radaudio_common.h:23
Definition Guid.h:109
Definition MovieSceneBindingReferences.h:47
Definition MovieSceneCustomBinding.h:28
Definition SlateBrush.h:239
Definition SlateIcon.h:13