UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
WorldPartitionClassDescRegistry.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
#pragma once
3
4
#if WITH_EDITOR
5
#include "
CoreMinimal.h
"
6
#include "
Misc/LazySingleton.h
"
7
#include "
UObject/ObjectMacros.h
"
8
#include "
WorldPartition/ActorDescList.h
"
9
#include "
ModuleDescriptor.h
"
10
11
class
UActorDescContainer
;
12
13
class
FWorldPartitionClassDescRegistry
:
public
FActorDescList
14
{
15
using
FNameClassDescMap
=
TMap<FTopLevelAssetPath, TUniquePtr<FWorldPartitionActorDesc>
*>;
16
using
FParentClassMap
=
TMap<FTopLevelAssetPath, FTopLevelAssetPath>
;
17
using
FRedirectClassMap
=
TMap<FTopLevelAssetPath, FTopLevelAssetPath>
;
18
19
public
:
20
static
ENGINE_API
FWorldPartitionClassDescRegistry
&
Get
();
21
static
ENGINE_API
void
TearDown();
22
23
ENGINE_API
void
Initialize
();
24
ENGINE_API
void
Uninitialize();
25
26
ENGINE_API
bool
IsInitialized
()
const
;
27
28
ENGINE_API
void
PrefetchClassDescs
(
const
TArray<FTopLevelAssetPath>
&
InClassPaths
);
29
30
ENGINE_API
bool
IsRegisteredClass
(
const
FTopLevelAssetPath
&
InClassPath
)
const
;
31
32
ENGINE_API
bool
IsDerivedFrom(
const
FWorldPartitionActorDesc
*
InClassDesc
,
const
FWorldPartitionActorDesc
*
InParentClassDesc
)
const
;
33
34
DECLARE_EVENT_OneParam
(
FWorldPartitionClassDescRegistry
,
FClassDescriptorUpdated
,
const
FWorldPartitionActorDesc
*);
35
FClassDescriptorUpdated
&
OnClassDescriptorUpdated
() {
return
ClassDescriptorUpdatedEvent
; }
36
37
private
:
38
ENGINE_API
void
PrefetchClassDesc
(
UClass
*
InClass
);
39
40
ENGINE_API
void
RegisterClassDescriptor
(
FWorldPartitionActorDesc
*
InClassDesc
);
41
ENGINE_API
void
UnregisterClassDescriptor
(
FWorldPartitionActorDesc
*
InClassDesc
);
42
43
ENGINE_API
void
RegisterClassDescriptorFromAssetData
(
const
FAssetData
&
InAssetData
);
44
ENGINE_API
void
RegisterClassDescriptorFromActorClass
(
const
UClass
*
InActorClass
);
45
46
friend
class
FActorDescArchive
;
47
friend
class
UActorDescContainer
;
48
ENGINE_API
const
FWorldPartitionActorDesc
*
GetClassDescDefault
(
const
FTopLevelAssetPath
&
InClassPath
)
const
;
49
ENGINE_API
const
FWorldPartitionActorDesc
*
GetClassDescDefaultForActor
(
const
FTopLevelAssetPath
&
InClassPath
)
const
;
50
ENGINE_API
const
FWorldPartitionActorDesc
*
GetClassDescDefaultForClass
(
const
FTopLevelAssetPath
&
InClassPath
)
const
;
51
52
friend
class
UWorldPartitionResaveActorsBuilder
;
53
const
FParentClassMap
&
GetParentClassMap
()
const
{
check
(
IsInitialized
());
return
ParentClassMap
; }
54
55
ENGINE_API
void
OnObjectPreSave
(
UObject
* InObject,
FObjectPreSaveContext
InSaveContext
);
56
ENGINE_API
void
OnObjectPropertyChanged(
UObject
* InObject,
FPropertyChangedEvent
&
InPropertyChangedEvent
);
57
58
ENGINE_API
void
OnPluginLoadingPhaseComplete
(
ELoadingPhase::Type
InLoadingPhase
,
bool
bInPhaseSuccessful
);
59
60
ENGINE_API
void
OnAssetRemoved(
const
FAssetData
&
InAssetData
);
61
ENGINE_API
void
OnAssetRenamed(
const
FAssetData
&
InAssetData
,
const
FString&
InOldObjectPath
);
62
63
ENGINE_API
void
RegisterClass(
UClass
*
Class
);
64
ENGINE_API
void
RegisterClasses
();
65
66
ENGINE_API
void
UpdateClassDescriptor
(
UObject
* InObject,
bool
bOnlyIfExists
);
67
68
ENGINE_API
void
ValidateInternalState
();
69
70
ENGINE_API
FTopLevelAssetPath
RedirectClassPath
(
const
FTopLevelAssetPath
&
InClassPath
)
const
;
71
72
FNameClassDescMap
ClassByPath
;
73
FParentClassMap
ParentClassMap
;
74
FRedirectClassMap
RedirectClassMap
;
75
FClassDescriptorUpdated
ClassDescriptorUpdatedEvent
;
76
};
77
#endif
ActorDescList.h
check
#define check(expr)
Definition
AssertionMacros.h:314
CoreMinimal.h
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
ERadixSortBufferState::IsInitialized
@ IsInitialized
DECLARE_EVENT_OneParam
#define DECLARE_EVENT_OneParam(OwningType, EventName, Param1Type)
Definition
DelegateCombinations.h:51
LazySingleton.h
ModuleDescriptor.h
ObjectMacros.h
ERepBuildType::Class
@ Class
ESlateAttributeBindAction::Initialize
@ Initialize
FActorDescList
Definition
ActorDescList.h:269
FObjectPreSaveContext
Definition
ObjectSaveContext.h:244
FWorldPartitionActorDesc
Definition
WorldPartitionActorDesc.h:282
TArray
Definition
Array.h:670
TMap
Definition
UnrealString.h.inl:34
UActorDescContainer
Definition
ActorDescContainer.h:40
UClass
Definition
Class.h:3793
UObject
Definition
Object.h:95
ELoadingPhase::Type
Type
Definition
ModuleDescriptor.h:27
ObjectPtr_Private::Get
FORCEINLINE T * Get(const FObjectPtr &ObjectPtr)
Definition
ObjectPtr.h:426
FAssetData
Definition
AssetData.h:162
FPropertyChangedEvent
Definition
UnrealType.h:6865
FTopLevelAssetPath
Definition
TopLevelAssetPath.h:38
Engine
Source
Runtime
Engine
Public
WorldPartition
WorldPartitionClassDescRegistry.h
Generated by
1.9.8