UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
WorldPartitionRuntimeContainerResolving.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreFwd.h"
6#include "Misc/Guid.h"
7#include "Containers/Map.h"
8#include "UObject/NameTypes.h"
11#include "WorldPartitionRuntimeContainerResolving.generated.h"
12
13USTRUCT()
34
35USTRUCT()
37{
39public:
40#if WITH_EDITOR
42 {
43 check(!ContainerInstances.Contains(InActorName));
44 ContainerInstances.Add(InActorName, InContainerInstance);
45 }
46#endif
47 SIZE_T GetAllocatedSize() const;
48private:
49 UPROPERTY()
51
53};
54
63USTRUCT()
65{
67public:
68 bool IsValid() const { return !MainContainerPackage.IsNone(); }
69 bool ResolveContainerPath(const FString& InSubObjectString, FString& OutSubObjectString) const;
71
72#if WITH_EDITOR
74 {
75 check(MainContainerPackage.IsNone());
76 MainContainerPackage = InContainerPackage;
77 }
78
80 {
81 check(!Containers.Contains(InContainerPackage));
82 return Containers.Add(InContainerPackage);
83 }
84
86 {
87 return Containers.Contains(InContainerPackage);
88 }
89
92#endif
93private:
94 UPROPERTY()
96 UPROPERTY()
97 FName MainContainerPackage;
98
99#if WITH_EDITORONLY_DATA
100 // Reverse lookup :
101 // ex: {ContainerID}, "LevelInstance1.LevelInstance2"
102 UPROPERTY()
104#endif
105};
#define check(expr)
Definition AssertionMacros.h:314
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
Definition NameTypes.h:617
Definition UnrealString.h.inl:34
Definition WorldPartitionActorContainerID.h:44
Definition Guid.h:109
Definition WorldPartitionRuntimeContainerResolving.h:15
FWorldPartitionRuntimeContainerInstance(const FGuid &InActorGuid, FName InContainerPackage)
Definition WorldPartitionRuntimeContainerResolving.h:21
FWorldPartitionRuntimeContainerInstance()
Definition WorldPartitionRuntimeContainerResolving.h:18
Definition WorldPartitionRuntimeContainerResolving.h:65
SIZE_T GetAllocatedSize() const
Definition WorldPartitionRuntimeContainerResolving.cpp:57
bool ResolveContainerPath(const FString &InSubObjectString, FString &OutSubObjectString) const
Definition WorldPartitionRuntimeContainerResolving.cpp:9
bool IsValid() const
Definition WorldPartitionRuntimeContainerResolving.h:68
Definition WorldPartitionRuntimeContainerResolving.h:37