UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DeprecatedDataLayerInstance.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
6#include "DeprecatedDataLayerInstance.generated.h"
7
9
10// Class used for Runtime Conversion of the Deprecated UDataLayer Class to UDataLayerInstance + UDataLayerAsset.
11// This class is not to be inherited. It is solely used by AWorldDatalayers to convert UDataLayers to UDataLayerInstances on Level Boot.
12// You will need to run the DataLayerToAsset CommandLet to convert the deprecated datalayers to UDataLayerAssets and UDataLayerInstanceWithAsset.
13UCLASS(Config = Engine, PerObjectConfig, Within = WorldDataLayers, AutoCollapseCategories = ("Data Layer|Advanced"), AutoExpandCategories = ("Data Layer|Editor", "Data Layer|Advanced|Runtime"), MinimalAPI)
14class UDeprecatedDataLayerInstance final : public UDataLayerInstance
15{
16 static_assert(DATALAYER_TO_INSTANCE_RUNTIME_CONVERSION_ENABLED, "UDeprecatedDataLayerInstance is deprecated and needs to be deleted.");
17
19
20#if WITH_EDITOR
21 //~ Begin UObject Interface
22 ENGINE_API virtual void PostLoad() override;
23 //~ End UObject Interface
24#endif
25
26public:
27#if WITH_EDITOR
28 static ENGINE_API FName MakeName();
29 ENGINE_API void OnCreated();
31
36#endif
37
38 FName GetDataLayerLabel() const { return Label; }
39
40private:
41#if WITH_EDITOR
42 //~ Begin UDataLayerInstance Interface
43 ENGINE_API virtual bool PerformAddActor(AActor* InActor) const override;
44 ENGINE_API virtual bool PerformRemoveActor(AActor* InActor) const override;
46 virtual bool SupportRelabeling() const override { return true; }
47 virtual bool CanEditDataLayerShortName() const override { return true; }
48 virtual void PerformSetDataLayerShortName(const FString& InNewShortName) { Label = *InNewShortName; }
49 //~ Endif UDataLayerInstance Interface
50#endif
51
52 //~ Begin UDataLayerInstance Interface
53 virtual FName GetDataLayerFName() const override { return !DeprecatedDataLayerFName.IsNone() ? DeprecatedDataLayerFName : Super::GetDataLayerFName(); }
54 virtual EDataLayerType GetType() const override { return DataLayerType; }
55 virtual bool IsRuntime() const override { return DataLayerType == EDataLayerType::Runtime; }
56 virtual FColor GetDebugColor() const override { return DebugColor; }
57 virtual FString GetDataLayerShortName() const override { return Label.ToString(); }
58 virtual FString GetDataLayerFullName() const override { return TEXT("Deprecated_") + Label.ToString(); }
59 //~ End UDataLayerInstance Interface
60
61private:
62 UPROPERTY()
63 FName Label;
64
65 UPROPERTY()
67
68 UPROPERTY(Category = "Data Layer", EditAnywhere)
69 EDataLayerType DataLayerType;
70
71 UPROPERTY(Category = "Data Layer|Runtime", EditAnywhere, meta = (EditConditionHides, EditCondition = "DataLayerType == EDataLayerType::Runtime"))
72 FColor DebugColor;
73
75 friend class UDataLayerConversionInfo;
78};
bool IsRuntime(const UBodySetup *BS)
Definition BodySetup.cpp:381
#define TEXT(x)
Definition Platform.h:1272
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DATALAYER_TO_INSTANCE_RUNTIME_CONVERSION_ENABLED
Definition DataLayerInstance.h:14
EDataLayerType
Definition DataLayerType.h:9
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition Actor.h:257
Definition WorldDataLayers.h:85
Definition Engine.Build.cs:7
Definition NameTypes.h:617
FORCEINLINE bool IsNone() const
Definition NameTypes.h:827
Definition DataLayer.h:52
ECollisionShapeType GetType(const Chaos::FImplicitObject &InGeometry)
Definition ChaosInterfaceWrapperCore.h:105
FString MakeName(const FString &InName, bool bIsJoint)
Definition InterchangeHelper.cpp:120
Definition ActorDataLayer.h:16
Definition Color.h:486
CORE_API FString ToString() const
Definition Color.cpp:584