UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PackedLevelActorBuilder.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#if WITH_EDITOR
6
7#include "CoreMinimal.h"
12#include "Containers/Set.h"
13#include "PreviewScene.h"
14
17class ALevelInstance;
18class AActor;
19class UActorComponent;
20class UBlueprint;
21class FMessageLog;
23
28{
29public:
31
33
34 /* Packs InPackedLevelActor using InLevelInstanceToPack as its source level actor */
36 /* Packs InPackedLevelActor using itself as the source level actor */
38 /* Packs InPackedLevelActor using InWorldAsset as the source level */
40
41 /* Creates/Updates a APackedLevelActor Blueprint from InLevelInstance (will overwrite existing asset or show a dialog if InBlueprintAsset is null) */
43 /* Creates/Updates a APackedLeveInstance Blueprint from InWorldAsset (will overwrite existing asset or show a dialog if InBlueprintAsset is null) */
45 /* Update existing Blueprint */
46 ENGINE_API void UpdateBlueprint(UBlueprint* Blueprint, bool bCheckoutAndSave = true);
47
48 static ENGINE_API const FString& GetPackedBPPrefix();
49 /* Creates a new APackedLevelActor Blueprint using InPackagePath/InAssetName as hint for path. Prompts the user to input the final asset name. */
51 /* Creates a new APackedLevelActor Blueprint using InPackagePath/InAssetName */
53
54 template<class T>
55 void AddBuilder()
56 {
57 check(!Builders.Contains(T::BuilderID));
58 Builders.Add(T::BuilderID, MakeUnique<T>(*this));
59 }
60
62private:
64
65 /* Create/Updates a APackedLevelActor Blueprint from InPackedActor (will overwrite existing asset or show a dialog if InBlueprintAsset is null) */
67 /* Creates/Updates a APackedLevelActor Blueprint from InLevelInstance (will overwrite existing asset or show a dialog if InBlueprintAsset is null) */
69 /* Creates and loads a ALevelInstance so it can be used for packing */
71
73 FPackedLevelActorBuilder& operator=(const FPackedLevelActorBuilder&) = delete;
74
75public:
77
78private:
79
82 FPreviewScene PreviewScene;
83};
84
85
87{
88public:
91
92 /* Interface for IPackedLevelActorBuilder's to use */
95 void Report(FMessageLog& Log) const;
96
98
101
103
106private:
108
111
113
116
118
120};
121
122#endif
#define check(expr)
Definition AssertionMacros.h:314
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition Actor.h:257
Definition LevelInstanceActor.h:19
Definition PackedLevelActor.h:26
Definition MessageLog.h:21
Definition PreviewScene.h:19
Definition LevelInstanceInterface.h:33
Definition UnrealString.h.inl:34
Definition SharedPointer.h:692
Definition ActorComponent.h:152
Definition Blueprint.h:403
Definition WorldPartitionActorFilter.h:23
Definition SoftObjectPtr.h:174