26#include "LandscapeProxy.generated.h"
32class ULandscapeComponent;
42class USplineComponent;
61 struct FAsyncBuildData;
94 UPROPERTY(Category =
"General", EditAnywhere)
97#if WITH_EDITORONLY_DATA
111 return LayerInfoObj ==
Other.LayerInfoObj;
121#if WITH_EDITORONLY_DATA
129 : LayerInfoObj(
nullptr)
143 return LayerInfoObj == LayerInfo;
168#if WITH_EDITORONLY_DATA
169 UPROPERTY(Category=
"Import", VisibleAnywhere)
175 UPROPERTY(Category=
"Import", EditAnywhere, meta=(DisplayName=
"Layer File"))
260 SquareRoot
UMETA(DisplayName =
"Square Root"),
301 return GetTypeHash(Key.BasedOn) ^
GetTypeHash(Key.GrassType) ^ Key.SqrtSubsections ^ Key.CachedMaxInstancesPerComponent ^ (Key.SubsectionX << 16) ^ (Key.SubsectionY << 24) ^ (Key.NumVarieties << 3) ^ (Key.VarietyIndex << 13);
346 return GetTypeHash(Key);
377USTRUCT(meta = (Deprecated =
"5.1"))
416UCLASS(Abstract, MinimalAPI, NotBlueprintable,
NotPlaceable,
hidecategories=(
Display, Attachment,
Physics,
Debug, Lighting),
showcategories=(Lighting,
Rendering,
Transformation),
hidecategories=(Mobility))
428#if WITH_EDITORONLY_DATA
463#if WITH_EDITORONLY_DATA
464 UE_DEPRECATED(5.6,
"PreEditPerLODOverrideMaterials has been deprecated. PerLODOverrideMaterial property changes handled in PostEditChange.")
492#if WITH_EDITORONLY_DATA
504#if WITH_EDITORONLY_DATA
505 UE_DEPRECATED(
all,
"Unused property, replaced by LOD0DistributionSetting and LODDistributionSetting")
515 UPROPERTY(EditAnywhere, Category =
"LOD Distribution", meta = (EditCondition =
"!bUseScalableLODSettings", DisplayName =
"LOD 0 Screen Size", ClampMin =
"0.1", ClampMax =
"10.0", UIMin =
"0.1", UIMax =
"10.0",
LandscapeInherited))
523 UPROPERTY(EditAnywhere, Category =
"LOD Distribution", meta = (EditCondition =
"!bUseScalableLODSettings", DisplayName =
"LOD 0", ClampMin =
"1.0", ClampMax =
"10.0", UIMin =
"1.0", UIMax =
"10.0",
LandscapeInherited))
527 UPROPERTY(EditAnywhere, Category =
"LOD Distribution", meta = (EditCondition =
"!bUseScalableLODSettings", DisplayName =
"Other LODs", ClampMin =
"1.0", ClampMax =
"10.0", UIMin =
"1.0", UIMax =
"10.0",
LandscapeInherited))
531 UPROPERTY(EditAnywhere, Category =
"LOD Distribution", meta = (EditCondition =
"bUseScalableLODSettings", DisplayName =
"Scalable LOD 0 Screen Size", ClampMin =
"0.1", ClampMax =
"10.0", UIMin =
"0.1", UIMax =
"10.0",
LandscapeInherited))
535 UPROPERTY(EditAnywhere, Category =
"LOD Distribution", meta = (EditCondition =
"bUseScalableLODSettings", DisplayName =
"Scalable LOD 0", ClampMin =
"1.0", ClampMax =
"10.0", UIMin =
"1.0", UIMax =
"10.0",
LandscapeInherited))
539 UPROPERTY(EditAnywhere, Category =
"LOD Distribution", meta = (EditCondition =
"bUseScalableLODSettings", DisplayName =
"Scalable Other LODs", ClampMin =
"1.0", ClampMax =
"10.0", UIMin =
"1.0", UIMax =
"10.0",
LandscapeInherited))
547 UPROPERTY(EditAnywhere, Category =
"LOD Distribution", meta = (DisplayName =
"Blend Range", ClampMin =
"0.01", ClampMax =
"1.0", UIMin =
"0.01", UIMax =
"1.0",
LandscapeInherited))
550#if WITH_EDITORONLY_DATA
558 int32 StaticLightingLOD;
570 float StreamingDistanceMultiplier;
581#if WITH_EDITORONLY_DATA
584 UE_DEPRECATED(
all,
"LandscapeComponentMaterialOverride has been deprecated, use PerLODOverrideMaterials instead.")
625 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category =
VirtualTexture, meta = (DisplayName =
"High Quality PerPixel Height", EditCondition =
"bVirtualTextureRenderWithQuad",
LandscapeOverridable))
632 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category =
VirtualTexture, meta = (DisplayName =
"Virtual Texture Num LODs", EditCondition =
"!bVirtualTextureRenderWithQuad", UIMin =
"0", UIMax =
"7",
LandscapeOverridable))
639 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category =
VirtualTexture, meta = (DisplayName =
"Virtual Texture LOD Bias", EditCondition =
"!bVirtualTextureRenderWithQuad", UIMin =
"0", UIMax =
"7",
LandscapeOverridable))
640 int32 VirtualTextureLodBias = 0;
676 UPROPERTY(NonTransactional, TextExportTransient, NonPIEDuplicateTransient)
717 float StaticLightingResolution;
724 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Lighting, AdvancedDisplay, meta = (EditCondition =
"CastShadow", DisplayName =
"Dynamic Shadow",
LandscapeOverridable))
725 uint8 bCastDynamicShadow : 1;
728 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Lighting, AdvancedDisplay, meta = (EditCondition =
"CastShadow", DisplayName =
"Static Shadow",
LandscapeOverridable))
729 uint8 bCastStaticShadow : 1;
736 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Lighting, AdvancedDisplay, meta = (EditCondition =
"CastShadow", DisplayName =
"Contact Shadow",
LandscapeOverridable))
737 uint8 bCastContactShadow : 1;
740 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Lighting, meta = (EditCondition =
"CastShadow", DisplayName =
"Far Shadow",
LandscapeOverridable))
741 uint32 bCastFarShadow : 1;
744 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Lighting, meta = (EditCondition =
"CastShadow", DisplayName =
"Hidden Shadow",
LandscapeOverridable))
745 uint8 bCastHiddenShadow : 1;
748 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Lighting, meta = (EditCondition =
"CastShadow", DisplayName =
"Shadow Two Sided",
LandscapeOverridable))
749 uint32 bCastShadowAsTwoSided : 1;
752 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Lighting, AdvancedDisplay, meta = (EditCondition =
"CastShadow",
LandscapeOverridable))
753 uint8 bAffectDistanceFieldLighting:1;
757 uint8 bAffectDynamicIndirectLighting:1;
760 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition=
"bAffectDynamicIndirectLighting", DisplayName =
"Affect Indirect Lighting While Hidden",
LandscapeOverridable), Interp)
761 uint8 bAffectIndirectLightingWhileHidden:1;
792 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Lighting, meta = (
LandscapeOverridable, ClampMin = "0.0", ClampMax = "10.0", UIMin = "0.0", UIMax = "10.0"))
801 uint32 bRenderCustomDepth:1;
809 int32 CustomDepthStencilValue;
821 int32 CollisionMipLevel;
825 int32 SimpleCollisionMipLevel;
839 uint32 bGenerateOverlapEvents : 1;
845#if WITH_EDITORONLY_DATA
871 uint32 CurrentVersion = 1;
898 int32 ComponentSizeQuads;
901 int32 SubsectionSizeQuads;
904 int32 NumSubsections;
921#if WITH_EDITORONLY_DATA
930#if WITH_EDITORONLY_DATA
932 UPROPERTY(EditAnywhere, Category =
HLOD, meta = (DisplayName =
"HLOD Texture Size Policy",
LandscapeOverridable, EditCondition =
"HLODMaterialOverride == nullptr"))
952 UE_DEPRECATED(5.7,
"Non-edit layer landscapes are deprecated, all landscapes use the edit layer system now.")
982 UE_DEPRECATED(5.6,
"Use ULandscapeSubsystem::OnLandscapeProxyComponentDataChanged")
986#if WITH_EDITORONLY_DATA
994 UFUNCTION(BlueprintCallable, Category =
"Rendering", meta=(DeprecatedFunction, DeprecationMessage =
"This value can't be changed anymore, you should edit the property LODDistributionSetting of the Landscape"))
1021 LANDSCAPE_API void EditorApplySpline(USplineComponent*
InSplineComponent,
float StartWidth = 200,
float EndWidth = 200,
float StartSideFalloff = 200,
float EndSideFalloff = 200,
float StartRoll = 0,
float EndRoll = 0,
int32 NumSubdivisions = 20,
bool bRaiseHeights =
true,
bool bLowerHeights =
true,
ULandscapeLayerInfoObject*
PaintLayer =
nullptr,
FName EditLayerName =
TEXT(""));
1040 virtual bool IsLevelBoundsRelevant()
const override {
return true; }
1096 LandscapeGuid =
Guid;
1111 UFUNCTION(BlueprintCallable, Category =
"Landscape|Runtime")
1130 if (UpdateInterval > 1)
1210 virtual void OnCookEvent(UE::Cook::ECookEvent
CookEvent, UE::Cook::FCookEventContext& CookContext)
override;
1235 UFUNCTION(BlueprintCallable, meta = (DisplayName =
"Landscape Export Heightmap to RenderTarget", Keywords =
"Push Landscape Heightmap to RenderTarget", UnsafeDuringActorConstruction =
"true"), Category =
Rendering)
1300 UE_DEPRECATED(5.6,
"InSlowTask was unused, please use the parameterless function")
1303 UE_DEPRECATED(5.6,
"InSlowTask was unused, please use the parameterless function")
1319 virtual void PostEditImport()
override;
1337 UE_DEPRECATED(5.6,
"This create function is deprecated. Please use new util UE::Landscape::CreateTargetLayerInfo instead.")
1461 FName MaterialSlotName =
TEXT(
"LandscapeMat");
1551 UFUNCTION(BlueprintCallable, meta = (DisplayName =
"Landscape Import Heightmap from RenderTarget", Keywords =
"Push RenderTarget to Landscape Heightmap", UnsafeDuringActorConstruction =
"true"), Category =
Rendering)
1558 UFUNCTION(BlueprintCallable, meta = (DisplayName =
"Landscape Import Weightmap from RenderTarget", Keywords =
"Push RenderTarget to Landscape Weightmap", UnsafeDuringActorConstruction =
"true"), Category =
Rendering)
1561 UE_DEPRECATED(5.7,
"Deprecating placeholder function. Not needed after non-edit layer landscape deprecation. ")
1574 UE_DEPRECATED(5.7,
"Non-edit layer landscapes are deprecated, all landscapes use the edit layer system now.")
1588 UFUNCTION(BlueprintCallable, Category =
"Landscape")
1659 UE_DEPRECATED(5.6,
"Use ULandscapeSubsystem::OnLandscapeProxyComponentDataChanged")
1705#if WITH_EDITORONLY_DATA
1742 UE_DEPRECATED(5.6,
"Use the function with the EBuildFlags param")
OODEFFUNC typedef const int const char * function
Definition oodle2.h:710
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define check(expr)
Definition AssertionMacros.h:314
@ BeginCacheForCookedPlatformData
uint32 GFrameNumber
Definition CoreGlobals.cpp:425
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define PURE_VIRTUAL(func,...)
Definition CoreMiscDefines.h:103
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
#define RETURN_QUICK_DECLARE_CYCLE_STAT(StatId, GroupId)
Definition Stats.h:655
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_MULTICAST_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:58
#define DECLARE_EVENT(OwningType, EventName)
Definition DelegateCombinations.h:32
DIRECTLINK_API Display
Definition DirectLinkLog.h:8
return true
Definition ExternalRpcRegistry.cpp:601
EHeightfieldSource
Definition LandscapeHeightfieldCollisionComponent.h:32
ELandscapeHLODTextureSizePolicy
Definition LandscapeProxy.h:231
ELandscapeLayerDisplayMode
Definition LandscapeProxy.h:215
ELandscapeLayerPaintingRestriction
Definition LandscapeProxy.h:199
ELandscapeHLODMeshSourceLODPolicy
Definition LandscapeProxy.h:241
ELandscapeImportAlphamapType
Definition LandscapeProxy.h:150
int32 GGrassMapUseRuntimeGeneration
Definition LandscapeGrassMapsBuilder.cpp:43
ENavDataGatheringMode
Definition NavDataGatheringMode.h:9
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
#define Absolute(a)
Definition Predicates.inl:150
ERendererStencilMask
Definition PrimitiveComponent.h:103
ERuntimeVirtualTextureMainPassType
Definition RuntimeVirtualTextureEnum.h:58
EShadowCacheInvalidationBehavior
Definition SceneTypes.h:219
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
ETextureSourceFormat
Definition TextureDefines.h:351
TextureGroup
Definition TextureDefines.h:29
uint32 Size
Definition VulkanMemory.cpp:4034
#define DEFINE_ACTORDESC_TYPE(ActorType, ActorDescType)
Definition WorldPartitionActorDescType.h:36
virtual ENGINE_API void PostLoad() override
Definition Actor.cpp:1103
virtual ENGINE_API void Destroyed()
Definition Actor.cpp:3284
static ENGINE_API void AddReferencedObjects(UObject *InThis, FReferenceCollector &Collector)
Definition Actor.cpp:567
Definition PartitionActor.h:17
Definition Archive.h:1208
Definition LandscapeProxy.h:360
~FAsyncGrassTask()
Definition LandscapeGrass.cpp:3127
TWeakObjectPtr< UHierarchicalInstancedStaticMeshComponent > Foliage
Definition LandscapeProxy.h:364
FCachedLandscapeFoliage::FGrassCompKey Key
Definition LandscapeProxy.h:363
void DoWork()
Definition LandscapeGrass.cpp:3122
FAsyncGrassBuilder * Builder
Definition LandscapeProxy.h:362
FORCEINLINE TStatId GetStatId() const
Definition LandscapeProxy.h:369
Definition AsyncWork.h:585
Definition ComponentRecreateRenderStateContext.h:13
Definition IDelegateInstance.h:14
Definition LandscapeEditReadback.h:17
Definition MaterialShared.h:3326
Definition NameTypes.h:617
Definition AsyncWork.h:663
Definition UObjectGlobals.h:1292
Definition ObjectSaveContext.h:244
Definition UnrealType.h:3087
Definition UnrealType.h:174
Definition UObjectGlobals.h:2492
Definition TransactionObjectEvent.h:181
Definition ILandscapeSplineInterface.h:20
virtual ULandscapeInfo * GetLandscapeInfo() const PURE_VIRTUAL(ILandscapeSplineInterface
Definition ILandscapeSplineInterface.h:24
virtual void virtual UpdateSharedProperties(ULandscapeInfo *InLandscapeInfo) PURE_VIRTUAL(ILandscapeSplineInterface boo IsSplineOwnerValid)() const PURE_VIRTUAL(ILandscapeSplineInterface
Definition ILandscapeSplineInterface.h:28
virtual FTransform LandscapeActorToWorld() const PURE_VIRTUAL(ILandscapeSplineInterface
Definition ILandscapeSplineInterface.h:25
virtual FGuid GetLandscapeGuid() const PURE_VIRTUAL(ILandscapeSplineInterface
Definition ILandscapeSplineInterface.h:23
Definition Landscape.Build.cs:7
Definition ArrayView.h:139
Definition EnumAsByte.h:22
Definition AssetRegistryState.h:50
Definition UnrealString.h.inl:34
Definition SharedPointer.h:153
Definition UniquePtr.h:107
Definition HierarchicalInstancedStaticMeshComponent.h:136
Definition LandscapeGrassType.h:172
Definition LandscapeHeightfieldCollisionComponent.h:41
Definition LandscapeInfo.h:109
Definition LandscapeLayerInfoObject.h:60
Definition LandscapeMaterialInstanceConstant.h:28
Definition LandscapeSplinesComponent.h:103
Definition LandscapeSubsystem.h:103
Definition LandscapeWeightmapUsage.h:14
Definition MaterialInstanceConstant.h:21
Definition MaterialInterface.h:296
virtual COREUOBJECT_API void FinishDestroy()
Definition Obj.cpp:1101
Definition PhysicalMaterial.h:104
Definition Texture2DArray.h:16
Definition Texture2D.h:26
Definition TextureRenderTarget2D.h:104
Definition Texture.h:1219
Definition LandscapeProxy.h:254
Type
Definition LandscapeProxy.h:256
Type
Definition RHIFeatureLevel.h:20
const FName CastShadow("CastShadow")
Definition SkinnedMeshComponent.h:50
bool operator==(const FCachedAssetKey &A, const FCachedAssetKey &B)
Definition AssetDataMap.h:501
Definition Landscape.h:55
EBuildFlags
Definition LandscapeEditTypes.h:70
EOutdatedDataFlags
Definition LandscapeEditTypes.h:44
constexpr float LOD0ScreenSize
Definition StaticMesh.cpp:303
Definition AdvancedWidgetsModule.cpp:13
Definition VirtualTextureRecreate.cpp:16
@ false
Definition radaudio_common.h:23
Definition SetUtilities.h:23
TCallTraits< FGrassCompKey >::ParamType KeyInitType
Definition SetUtilities.h:25
static double Seconds()
Definition AndroidPlatformTime.h:20
Definition LandscapeGrass.cpp:1815
Definition BodyInstance.h:320
Definition LandscapeProxy.h:333
static bool Matches(KeyInitType A, KeyInitType B)
Definition LandscapeProxy.h:339
static KeyInitType GetSetKey(const FGrassComp &Element)
Definition LandscapeProxy.h:334
static uint32 GetKeyHash(KeyInitType Key)
Definition LandscapeProxy.h:344
Definition LandscapeProxy.h:267
int32 NumVarieties
Definition LandscapeProxy.h:274
int32 SqrtSubsections
Definition LandscapeProxy.h:270
TWeakObjectPtr< ULandscapeGrassType > GrassType
Definition LandscapeProxy.h:269
int32 SubsectionY
Definition LandscapeProxy.h:273
FGrassCompKey()
Definition LandscapeProxy.h:277
int32 VarietyIndex
Definition LandscapeProxy.h:275
friend uint32 GetTypeHash(const FGrassCompKey &Key)
Definition LandscapeProxy.h:299
TWeakObjectPtr< ULandscapeComponent > BasedOn
Definition LandscapeProxy.h:268
bool operator==(const FGrassCompKey &Other) const
Definition LandscapeProxy.h:286
int32 SubsectionX
Definition LandscapeProxy.h:272
int32 CachedMaxInstancesPerComponent
Definition LandscapeProxy.h:271
Definition LandscapeProxy.h:307
double LastUsedTime
Definition LandscapeProxy.h:314
TWeakObjectPtr< UHierarchicalInstancedStaticMeshComponent > Foliage
Definition LandscapeProxy.h:309
FGrassCompKey Key
Definition LandscapeProxy.h:308
TWeakObjectPtr< UHierarchicalInstancedStaticMeshComponent > PreviousFoliage
Definition LandscapeProxy.h:310
uint32 ExclusionChangeTag
Definition LandscapeProxy.h:313
uint32 LastUsedFrameNumber
Definition LandscapeProxy.h:312
TArray< FBox > ExcludedBoxes
Definition LandscapeProxy.h:311
FGrassComp()
Definition LandscapeProxy.h:318
bool PendingRemovalRebuild
Definition LandscapeProxy.h:316
bool Pending
Definition LandscapeProxy.h:315
void Touch()
Definition LandscapeProxy.h:325
Definition LandscapeProxy.h:265
TSet< FGrassComp, FGrassCompKeyFuncs > TGrassSet
Definition LandscapeProxy.h:350
TSet< FGrassComp, FGrassCompKeyFuncs > CachedGrassComps
Definition LandscapeProxy.h:351
void ClearCache()
Definition LandscapeProxy.h:353
Definition LandscapeProxy.h:165
Definition LandscapeInfo.h:66
Definition Landscape.h:169
Definition LandscapeComponent.h:285
Definition LandscapeProxy.h:91
Definition EngineTypes.h:562
Definition EngineTypes.h:2167
static constexpr UE_FORCEINLINE_HINT T DivideAndRoundUp(T Dividend, T Divisor)
Definition UnrealMathUtility.h:694
Definition MeshDescription.h:94
Definition LandscapeLayerInfoObject.h:17
Definition PerQualityLevelProperties.h:273
Definition UnrealType.h:6865
Definition ResourceArray.h:31
Definition ScopedSlowTask.h:32
Definition WeakObjectPtr.h:49
Definition ObjectPtr.h:488
Definition Optional.h:131
Definition LightweightStats.h:416
Definition WeakObjectPtrTemplates.h:25
Definition LandscapeNaniteComponent.h:36