UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LandscapeLayerInfoObject.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
8#include "UObject/Object.h"
9#include "LandscapeLayerInfoObject.generated.h"
10
12class UTexture2D;
14
15
43
44// ----------------------------------------------------------------------------------
45
46UENUM()
48{
49 Red,
50 Green,
51 Blue,
52 Alpha
53};
54
55
56// ----------------------------------------------------------------------------------
57
58UCLASS(MinimalAPI, BlueprintType)
60{
62
63 UE_DEPRECATED(5.7, "Property will be made private. Use public Getters/Setter instead.")
64 UPROPERTY(VisibleAnywhere, Category = LandscapeLayerInfoObject, AssetRegistrySearchable)
65 FName LayerName;
66
67 UE_DEPRECATED(5.7, "Property will be made private. Use public Getters/Setter instead.")
68 UPROPERTY(EditAnywhere, Category = LandscapeLayerInfoObject, Meta = (DisplayName = "Physical Material", Tooltip = "Physical material to use when this layer is the predominant one at a given location. Note: this is ignored if the Landscape Physical Material node is used in the landscape material. "))
70
71 UE_DEPRECATED(5.7, "Property will be made private. Use public Getters/Setter instead.")
72 UPROPERTY(EditAnywhere, Category = LandscapeLayerInfoObject, Meta = (ClampMin = "0", ClampMax = "1", Tooltip = "Defines how much 'resistance' areas painted with this layer will offer to the Erosion tool. A hardness of 0 means the layer is fully affected by erosion, while 1 means fully unaffected."))
73 float Hardness = 0.0f;
74
75#if WITH_EDITORONLY_DATA
76 UE_DEPRECATED(5.7, "Property will be made private. Use public Getters/Setter instead.")
77 UPROPERTY(EditAnywhere, Category = LandscapeLayerInfoObject, Meta = (ClampMin = "0", ClampMax = "1", Tooltip = "The minimum weight that needs to be painted for that layer to be picked up as the dominant physical layer."))
79
80 UE_DEPRECATED(5.7, "bNoWeightBlend has been replaced by BlendMethod (false is ELandscapeTargetLayerBlendMethod::FinalWeightBlending, true is ELandscapeTargetLayerBlendMethod::None)")
81 UPROPERTY()
83
84 UE_DEPRECATED(5.7, "Property will be made private. Use public Getters/Setter instead.")
85 UPROPERTY(EditAnywhere, Category = SplineFalloffModulation, Meta = (DisplayName="Texture", Tooltip = "Texture to modulate the Splines Falloff Layer Alpha"))
87
88 UE_DEPRECATED(5.7, "Property will be made private. Use public Getters/Setter instead.")
89 UPROPERTY(EditAnywhere, Category = SplineFalloffModulation, Meta = (DisplayName = "Color Mask", Tooltip = "Defines which channel of the Spline Falloff Modulation Texture to use."))
91
92 UE_DEPRECATED(5.7, "Property will be made private. Use public Getters/Setter instead.")
93 UPROPERTY(EditAnywhere, Category = SplineFalloffModulation, Meta = (DisplayName = "Tiling", ClampMin = "0.01", Tooltip = "Defines the tiling to use when sampling the Spline Falloff Modulation Texture."))
95
96 UE_DEPRECATED(5.7, "Property will be made private. Use public Getters/Setter instead.")
97 UPROPERTY(EditAnywhere, Category = SplineFalloffModulation, Meta = (DisplayName = "Bias", ClampMin = "0", Tooltip = "Defines the offset to use when sampling the Spline Falloff Modulation Texture."))
98 float SplineFalloffModulationBias = 0.5f;
99
100 UE_DEPRECATED(5.7, "Property will be made private. Use public Getters/Setter instead.")
101 UPROPERTY(EditAnywhere, Category = SplineFalloffModulation, Meta = (DisplayName = "Scale", ClampMin = "0", Tooltip = "Allows to scale the value sampled from the Spline Falloff Modulation Texture."))
102 float SplineFalloffModulationScale = 1.0f;
103
104 // TODO [jared.ritchie] Property is used to hide the unused target layers in the UX when ShowUnusedLayers is false. This data should be per-landscape, so it's not valid to store it in the layer object
105 // Two landscapes can loaded and reference the same layer info object with one of them saying "there is data associated with this layer" and the other, the contrary
106 UE_DEPRECATED(5.7, "This property will be removed in a future release.")
107 UPROPERTY(NonTransactional, Transient)
108 bool IsReferencedFromLoadedData = false;
109#endif // WITH_EDITORONLY_DATA
110
111 UE_DEPRECATED(5.7, "Property will be made private. Use public Getters/Setter instead.")
112 UPROPERTY(EditAnywhere, Category = LandscapeLayerInfoObject, Meta = (Tooltip = "The color to use for layer usage debug"))
113 FLinearColor LayerUsageDebugColor;
114
115public:
117 {
118 return BlendMethod;
119 }
125
126 inline FName GetBlendGroup() const
127 {
128 return BlendGroup;
129 }
134 LANDSCAPE_API void SetBlendGroup(const FName& InBlendGroup, bool bInModify);
135
136 // TODO [jared.ritchie] in 5.9 when public properties are made private, re-enable deprecation warnings
138 inline const FName& GetLayerName() const
139 {
140 return LayerName;
141 }
146 LANDSCAPE_API void SetLayerName(const FName& InLayerName, bool bInModify);
147
149 {
150 return PhysMaterial;
151 }
157
158 inline float GetHardness() const
159 {
160 return Hardness;
161 }
167
169 {
170 return LayerUsageDebugColor;
171 }
173 {
174 return GET_MEMBER_NAME_CHECKED(ULandscapeLayerInfoObject, LayerUsageDebugColor);
175 };
177
178#if WITH_EDITORONLY_DATA
179 inline float GetMinimumCollisionRelevanceWeight() const
180 {
182 }
184 {
186 };
188
190 {
192 }
194 {
196 };
198
200 {
202 }
204 {
206 };
208
209 inline float GetSplineFalloffModulationTiling() const
210 {
212 }
214 {
216 };
218
219 inline float GetSplineFalloffModulationBias() const
220 {
222 }
224 {
226 };
228
229 inline float GetSplineFalloffModulationScale() const
230 {
232 }
234 {
236 };
238#endif // WITH_EDITORONLY_DATA
240
241 virtual void Serialize(FArchive& Ar) override;
242
243#if WITH_EDITOR
244 //~ Begin UObject Interface
245 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
246 virtual void PostLoad() override;
247 //~ End UObject Interface
248
251 FOnLayerInfoDataChanged::RegistrationType& OnLayerInfoChanged() const
252 {
254 }
255
257#endif
258
259 LANDSCAPE_API FLinearColor GenerateLayerUsageDebugColor() const;
260
261private:
262 UPROPERTY(EditAnywhere, Category = LandscapeLayerInfoObject, Meta = (Tooltip = "Allows this layer's final weight to be adjusted against others."))
264
265 UPROPERTY(EditAnywhere, Category = LandscapeLayerInfoObject, Meta = (EditCondition = "BlendMethod == ELandscapeTargetLayerBlendMethod::PremultipliedAlphaBlending", Tooltip = "Only available for Advanced Weight Blending. Allows target layers from the same group only to have their weight adjusted against one another."))
266 FName BlendGroup;
267
268#if WITH_EDITOR
270#endif // WITH_EDITOR
271};
#define GET_MEMBER_NAME_CHECKED(ClassName, MemberName)
Definition AssertionMacros.h:493
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_MULTICAST_DELEGATE_OneParam(DelegateName, Param1Type)
Definition DelegateCombinations.h:49
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
ELandscapeTargetLayerBlendMethod
Definition LandscapeEditTypes.h:33
ESplineModulationColorMask
Definition LandscapeLayerInfoObject.h:48
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Archive.h:1208
Definition NameTypes.h:617
Definition LandscapeLayerInfoObject.h:60
static FName GetPhysicalMaterialMemberName()
Definition LandscapeLayerInfoObject.h:152
static FName GetBlendGroupMemberName()
Definition LandscapeLayerInfoObject.h:130
static FName GetHardnessMemberName()
Definition LandscapeLayerInfoObject.h:162
ELandscapeTargetLayerBlendMethod GetBlendMethod() const
Definition LandscapeLayerInfoObject.h:116
PRAGMA_DISABLE_DEPRECATION_WARNINGS const FName & GetLayerName() const
Definition LandscapeLayerInfoObject.h:138
FName GetBlendGroup() const
Definition LandscapeLayerInfoObject.h:126
const FLinearColor & GetLayerUsageDebugColor() const
Definition LandscapeLayerInfoObject.h:168
static FName GetLayerUsageDebugColorMemberName()
Definition LandscapeLayerInfoObject.h:172
static FName GetBlendMethodMemberName()
Definition LandscapeLayerInfoObject.h:120
float GetHardness() const
Definition LandscapeLayerInfoObject.h:158
static FName GetLayerNameMemberName()
Definition LandscapeLayerInfoObject.h:142
TObjectPtr< UPhysicalMaterial > GetPhysicalMaterial() const
Definition LandscapeLayerInfoObject.h:148
Definition Object.h:95
Definition PhysicalMaterial.h:104
Definition Texture2D.h:26
uint32 Type
Definition UnrealType.h:6835
Definition Color.h:48
Definition LandscapeLayerInfoObject.h:17
FOnLandscapeLayerInfoDataChangedParams(const ULandscapeLayerInfoObject &InLayerInfoObject, const FPropertyChangedEvent &InPropertyChangedEvent=FPropertyChangedEvent(nullptr))
Definition LandscapeLayerInfoObject.h:18
bool bUserTriggered
Definition LandscapeLayerInfoObject.h:28
bool bHasValueChanged
Definition LandscapeLayerInfoObject.h:38
const ULandscapeLayerInfoObject * LayerInfoObject
Definition LandscapeLayerInfoObject.h:41
FPropertyChangedEvent PropertyChangedEvent
Definition LandscapeLayerInfoObject.h:25
bool bRequiresLandscapeUpdate
Definition LandscapeLayerInfoObject.h:31
Definition UnrealType.h:6865
Definition ObjectPtr.h:488