UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LandscapeProxy.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
5#include "Stats/Stats.h"
7#include "Misc/Guid.h"
11#include "Async/AsyncWork.h"
12#include "Engine/Texture.h"
21
22#if WITH_EDITOR
24#endif
25
26#include "LandscapeProxy.generated.h"
27
28class ALandscape;
29class ALandscapeProxy;
32class ULandscapeComponent;
35class ULandscapeInfo;
42class USplineComponent;
43class UTexture2D;
51struct FMeshDescription;
52
53enum class ENavDataGatheringMode : uint8;
54namespace UE::Landscape
55{
56 enum class EOutdatedDataFlags : uint8;
57 enum class EBuildFlags : uint8;
58
59 namespace Nanite
60 {
61 struct FAsyncBuildData;
62 } // end of namespace UE::Landscape::Nanite
63} // end of namespace UE::Landscape
64
65#if WITH_EDITOR
68
70
72{
73};
75
77{
79 ALandscape* Landscape = nullptr;
82};
84#endif // WITH_EDITOR
85
86
87// ----------------------------------------------------------------------------------
88
89USTRUCT()
91{
93
94 UPROPERTY(Category = "General", EditAnywhere)
96
97#if WITH_EDITORONLY_DATA
98 UPROPERTY()
100
102
104 : LayerInfoObj(InLayerInfo)
106 {
107 }
108
109 bool operator==(const FLandscapeTargetLayerSettings& Other) const
110 {
111 return LayerInfoObj == Other.LayerInfoObj;
112 }
113#endif // WITH_EDITORONLY_DATA
114};
115
116USTRUCT()
118{
120
121#if WITH_EDITORONLY_DATA
122 UPROPERTY()
124
125 UPROPERTY()
126 FString ReimportLayerFilePath;
127
129 : LayerInfoObj(nullptr)
131 {
132 }
133
135 : LayerInfoObj(InLayerInfo)
137 {
138 }
139
140 // To allow FindByKey etc
141 bool operator==(const ULandscapeLayerInfoObject* LayerInfo) const
142 {
143 return LayerInfoObj == LayerInfo;
144 }
145#endif // WITH_EDITORONLY_DATA
146};
147
148UENUM()
150{
151 // Three layers blended 50/30/20 represented as 0.5, 0.3, and 0.2 in the alpha maps
152 // All alpha maps for blended layers total to 1.0
153 // This is the style used by UE internally for blended layers
154 Additive,
155
156 // Three layers blended 50/30/20 represented as 0.5, 0.6, and 1.0 in the alpha maps
157 // Each alpha map only specifies the remainder from previous layers, so the last layer used will always be 1.0
158 // Some other tools use this format
159 Layered,
160};
161
163USTRUCT()
165{
167
168#if WITH_EDITORONLY_DATA
169 UPROPERTY(Category="Import", VisibleAnywhere)
170 FName LayerName;
171
172 UPROPERTY(Category="Import", EditAnywhere, meta=(NoCreate))
174
175 UPROPERTY(Category="Import", EditAnywhere, meta=(DisplayName="Layer File"))
176 FString SourceFilePath; // Optional
177
178 // Raw weightmap data
180#endif
181
182#if WITH_EDITOR
184 : LayerName(InLayerName)
185 , LayerInfo(nullptr)
186 , SourceFilePath("")
187 {
188 }
189
191#endif
192};
193
194// this is only here because putting it in LandscapeEditorObject.h (where it belongs)
195// results in Engine being dependent on LandscapeEditor, as the actual landscape editing
196// code (e.g. LandscapeEdit.h) is in /Engine/ for some reason...
197UENUM()
199{
201 None UMETA(DisplayName="None"),
202
204 UseMaxLayers UMETA(DisplayName="Limit Layer Count"),
205
207 ExistingOnly UMETA(DisplayName="Existing Layers Only"),
208
210 UseComponentAllowList UMETA(DisplayName="Component Allow List"),
211};
212
213UENUM()
215{
217 Default,
218
221
224
227};
228
229UENUM()
238
239UENUM()
251
252UENUM()
254{
255 enum Type : int
256 {
258 Linear UMETA(DisplayName = "Linear"),
260 SquareRoot UMETA(DisplayName = "Square Root"),
261 };
262}
263
265{
267 {
276
278 : SqrtSubsections(0)
280 , SubsectionX(0)
281 , SubsectionY(0)
282 , NumVarieties(0)
283 , VarietyIndex(-1)
284 {
285 }
286 inline bool operator==(const FGrassCompKey& Other) const
287 {
288 return
289 SqrtSubsections == Other.SqrtSubsections &&
290 CachedMaxInstancesPerComponent == Other.CachedMaxInstancesPerComponent &&
291 SubsectionX == Other.SubsectionX &&
292 SubsectionY == Other.SubsectionY &&
293 BasedOn == Other.BasedOn &&
294 GrassType == Other.GrassType &&
295 NumVarieties == Other.NumVarieties &&
296 VarietyIndex == Other.VarietyIndex;
297 }
298
300 {
301 return GetTypeHash(Key.BasedOn) ^ GetTypeHash(Key.GrassType) ^ Key.SqrtSubsections ^ Key.CachedMaxInstancesPerComponent ^ (Key.SubsectionX << 16) ^ (Key.SubsectionY << 24) ^ (Key.NumVarieties << 3) ^ (Key.VarietyIndex << 13);
302 }
303
304 };
305
331
332 struct FGrassCompKeyFuncs : BaseKeyFuncs<FGrassComp,FGrassCompKey>
333 {
334 static KeyInitType GetSetKey(const FGrassComp& Element)
335 {
336 return Element.Key;
337 }
338
340 {
341 return A == B;
342 }
343
345 {
346 return GetTypeHash(Key);
347 }
348 };
349
352
354 {
355 CachedGrassComps.Empty();
356 }
357};
358
376
377USTRUCT(meta = (Deprecated = "5.1"))
379{
381
382 UPROPERTY()
383 FPerPlatformInt LODIndex;
384
385 UPROPERTY()
387};
388
389
390#if WITH_EDITOR
391// Tracks delayed updates triggered by landscape updates.
392// It's responsible for preventing expensive async operations while the user is still editing the landscape
393struct FAsyncWorkMonitor
394{
395public:
396 enum class EAsyncWorkType : uint8
397 {
399 Max
400 };
401
404 void Tick(float Detaltime);
405
406private:
407 struct FAsyncWorkTypeInfo
408 {
409 bool bUpdateTriggered = false;
411 };
412
413 TStaticArray<FAsyncWorkTypeInfo, static_cast<uint32>(EAsyncWorkType::Max)> WorkTypeInfos; // [static_cast<uint32>(EAsyncWorkType::Max)] ;
414};
415#endif
416UCLASS(Abstract, MinimalAPI, NotBlueprintable, NotPlaceable, hidecategories=(Display, Attachment, Physics, Debug, Lighting), showcategories=(Lighting, Rendering, Transformation), hidecategories=(Mobility))
417class ALandscapeProxy : public APartitionActor, public ILandscapeSplineInterface
418{
420
421public:
422 ALandscapeProxy(const FObjectInitializer& ObjectInitializer);
423
424 virtual ~ALandscapeProxy();
425
427
428#if WITH_EDITORONLY_DATA
437
438 friend class FLandscapeActorDesc;
439#endif // WITH_EDITORONLY_DATA
440
441 UPROPERTY()
442 TObjectPtr<ULandscapeSplinesComponent> SplineComponent;
443
448 FGuid LandscapeGuid;
449
453 UPROPERTY(Transient, DuplicateTransient, meta = (LandscapeInherited))
455
457 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Nanite, meta = (LandscapeInherited))
458 bool bEnableNanite = false;
459
460 UPROPERTY(EditAnywhere, Category = Landscape, meta = (LandscapeOverridable))
462
463#if WITH_EDITORONLY_DATA
464 UE_DEPRECATED(5.6, "PreEditPerLODOverrideMaterials has been deprecated. PerLODOverrideMaterial property changes handled in PostEditChange.")
467
469 UPROPERTY(EditAnywhere, Category = Nanite, AdvancedDisplay, meta = (EditCondition = "bEnableNanite", LandscapeInherited))
471
472 UPROPERTY(EditAnywhere, Category = Nanite, AdvancedDisplay, meta = (EditCondition = "bEnableNanite", LandscapeInherited))
474
475 UPROPERTY(EditAnywhere, Category = Nanite, AdvancedDisplay, meta = (EditCondition = "bEnableNanite", LandscapeInherited))
476 float NaniteSkirtDepth = 0.1f;
477
478 UPROPERTY(EditAnywhere, Category = Nanite, AdvancedDisplay, meta = (EditCondition = "bEnableNanite", LandscapeInherited))
480
481 UPROPERTY(EditAnywhere, Category = Nanite, AdvancedDisplay, meta = (EditCondition = "bEnableNanite", LandscapeInherited))
482 float NaniteMaxEdgeLengthFactor = 16.0f;
483
485#endif // WITH_EDITORONLY_DATA
486
490
491public:
492#if WITH_EDITORONLY_DATA
493 UPROPERTY()
495
496 UE_DEPRECATED(5.7, "Use private SectionBase with GetSectionBase instead.")
497 FIntPoint LandscapeSectionOffset;
498#endif //WITH_EDITORONLY_DATA
499
501 UPROPERTY(EditAnywhere, Category=LOD, meta = (LandscapeInherited))
503
504#if WITH_EDITORONLY_DATA
505 UE_DEPRECATED(all, "Unused property, replaced by LOD0DistributionSetting and LODDistributionSetting")
506 UPROPERTY()
508
510 UPROPERTY()
512#endif // WITH_EDITORONLY_DATA
513
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))
516 float LOD0ScreenSize = 0.5f;
517
519 UPROPERTY(EditAnywhere, Category = LOD, AdvancedDisplay, meta = (LandscapeInherited))
520 uint32 LODGroupKey = 0;
521
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))
524 float LOD0DistributionSetting = 1.25f;
525
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))
528 float LODDistributionSetting = 3.0f;
529
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))
533
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))
537
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))
541
543 UPROPERTY(EditAnywhere, Category = "LOD Distribution", meta = (LandscapeInherited))
544 bool bUseScalableLODSettings = false;
545
547 UPROPERTY(EditAnywhere, Category = "LOD Distribution", meta = (DisplayName = "Blend Range", ClampMin = "0.01", ClampMax = "1.0", UIMin = "0.01", UIMax = "1.0", LandscapeInherited))
548 float LODBlendRange = 0.1f;
549
550#if WITH_EDITORONLY_DATA
552 UPROPERTY(EditAnywhere, Category=LOD, AdvancedDisplay, meta = (LandscapeOverridable))
554#endif
555
557 UPROPERTY(EditAnywhere, Category=Lighting, meta = (LandscapeOverridable))
558 int32 StaticLightingLOD;
559
561 UPROPERTY(EditAnywhere, Category=Landscape, meta = (LandscapeOverridable))
562 TObjectPtr<UPhysicalMaterial> DefaultPhysMaterial;
563
569 UPROPERTY(EditAnywhere, Category=Landscape, meta = (LandscapeOverridable))
570 float StreamingDistanceMultiplier;
571
573 UPROPERTY(EditAnywhere, BlueprintSetter=EditorSetLandscapeMaterial, Category=Landscape, meta=(LandscapeOverridable))
575
577 UPROPERTY(EditAnywhere, Category=Landscape, AdvancedDisplay, meta = (LandscapeOverridable))
579
580
581#if WITH_EDITORONLY_DATA
582
584 UE_DEPRECATED(all, "LandscapeComponentMaterialOverride has been deprecated, use PerLODOverrideMaterials instead.")
585 UPROPERTY()
588
589 UE_DEPRECATED(5.6, "PreEditLandscapeMaterial has been deprecated. LandscapeMaterial Property changes handled in PostEditChange.")
592
593 UE_DEPRECATED(5.6, "PreEditLandscapeHoleMaterial has been deprecated. LandscapeHoleMaterial Property changes handled in PostEditChange.")
596
597 UE_DEPRECATED(5.6, "bIsPerformingInteractiveActionOnLandscapeMaterialOverride has been deprecated. PostEditChange checks interaction type.")
600#endif // WITH_EDITORONLY_DATA
601
606 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = VirtualTexture, meta = (DisplayName = "Draw in Virtual Textures", LandscapeOverridable))
607 TArray<TObjectPtr<URuntimeVirtualTexture>> RuntimeVirtualTextures;
608
610 UPROPERTY(VisibleAnywhere, Transient, Category = VirtualTexture)
612
618 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = VirtualTexture, meta = (LandscapeOverridable))
620
625 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = VirtualTexture, meta = (DisplayName = "High Quality PerPixel Height", EditCondition = "bVirtualTextureRenderWithQuad", LandscapeOverridable))
627
632 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = VirtualTexture, meta = (DisplayName = "Virtual Texture Num LODs", EditCondition = "!bVirtualTextureRenderWithQuad", UIMin = "0", UIMax = "7", LandscapeOverridable))
634
639 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = VirtualTexture, meta = (DisplayName = "Virtual Texture LOD Bias", EditCondition = "!bVirtualTextureRenderWithQuad", UIMin = "0", UIMax = "7", LandscapeOverridable))
640 int32 VirtualTextureLodBias = 0;
641
643 UPROPERTY(EditAnywhere, BlueprintSetter = SetVirtualTextureRenderPassType, Category = VirtualTexture, meta = (DisplayName = "Draw in Main Pass", LandscapeOverridable))
644 ERuntimeVirtualTextureMainPassType VirtualTextureRenderPassType = ERuntimeVirtualTextureMainPassType::Always;
645
646 UFUNCTION(BlueprintSetter)
648
652 UPROPERTY(EditAnywhere, Category=Landscape, meta = (LandscapeOverridable))
654
658 UPROPERTY(EditAnywhere, Category=Landscape, meta = (LandscapeOverridable))
660
662 UPROPERTY()
663 TArray<TObjectPtr<ULandscapeComponent>> LandscapeComponents;
664
666 UPROPERTY()
668
671
672 UE_DEPRECATED(all, "NaniteComponent has been deprecated, use NaniteComponents instead.")
673 UPROPERTY()
675
676 UPROPERTY(NonTransactional, TextExportTransient, NonPIEDuplicateTransient)
678
685
686 // Only used outside of the editor (e.g. in cooked builds) - this value is no longer authoritative TODO [chris.tchou] remove
687 // Cached grass max discard distance for all grass types in all landscape components with landscape grass configured
688 UPROPERTY()
689 float GrassTypesMaxDiscardDistance = 0.0f;
690
691 // Non-serialized runtime cache of values derived from the assigned grass types.
692 // Call ALandscapeProxy::UpdateGrassTypeSummary() to update.
694 {
695 // Used to track validity of these values, as it automatically invalidates if you add or remove a component.
696 // If you do both add AND remove, then the add should also trigger UpdateGrassTypes() which will invalidate this cache.
697 // Negative is the invalid state.
699
700 bool bHasAnyGrass = true;
702 };
704 inline bool IsGrassTypeSummaryValid() { return LandscapeComponents.Num() == GrassTypeSummary.LandscapeComponentCount; }
705 inline void InvalidateGrassTypeSummary() { GrassTypeSummary.LandscapeComponentCount = -1; }
707
710
716 UPROPERTY(EditAnywhere, Category=Lighting, meta = (LandscapeOverridable))
717 float StaticLightingResolution;
718
720 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Lighting, meta = (LandscapeOverridable))
721 uint8 CastShadow : 1;
722
724 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Lighting, AdvancedDisplay, meta = (EditCondition = "CastShadow", DisplayName = "Dynamic Shadow", LandscapeOverridable))
725 uint8 bCastDynamicShadow : 1;
726
728 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Lighting, AdvancedDisplay, meta = (EditCondition = "CastShadow", DisplayName = "Static Shadow", LandscapeOverridable))
729 uint8 bCastStaticShadow : 1;
730
732 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Lighting, AdvancedDisplay, meta=(EditCondition="CastShadow", LandscapeOverridable))
733 EShadowCacheInvalidationBehavior ShadowCacheInvalidationBehavior;
734
736 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Lighting, AdvancedDisplay, meta = (EditCondition = "CastShadow", DisplayName = "Contact Shadow", LandscapeOverridable))
737 uint8 bCastContactShadow : 1;
738
740 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Lighting, meta = (EditCondition = "CastShadow", DisplayName = "Far Shadow", LandscapeOverridable))
741 uint32 bCastFarShadow : 1;
742
744 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Lighting, meta = (EditCondition = "CastShadow", DisplayName = "Hidden Shadow", LandscapeOverridable))
745 uint8 bCastHiddenShadow : 1;
746
748 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Lighting, meta = (EditCondition = "CastShadow", DisplayName = "Shadow Two Sided", LandscapeOverridable))
749 uint32 bCastShadowAsTwoSided : 1;
750
752 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Lighting, AdvancedDisplay, meta = (EditCondition = "CastShadow", LandscapeOverridable))
753 uint8 bAffectDistanceFieldLighting:1;
754
756 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Lighting, AdvancedDisplay, meta=(LandscapeOverridable), Interp)
757 uint8 bAffectDynamicIndirectLighting:1;
758
760 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting, meta=(EditCondition="bAffectDynamicIndirectLighting", DisplayName = "Affect Indirect Lighting While Hidden", LandscapeOverridable), Interp)
761 uint8 bAffectIndirectLightingWhileHidden:1;
762
767 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Lighting, meta = (LandscapeOverridable))
768 FLightingChannels LightingChannels;
769
771 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Lighting, meta = (LandscapeInherited))
773
776 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Lighting, meta = (LandscapeOverridable))
778
783 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Lighting, meta = (LandscapeOverridable, UIMin = 0.0, ClampMin = 0.0))
785
792 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Lighting, meta = (LandscapeOverridable, ClampMin = "0.0", ClampMax = "10.0", UIMin = "0.0", UIMax = "10.0"))
794
796 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Rendering, meta=(LandscapeOverridable), Interp)
797 uint8 bHoldout : 1;
798
800 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering, meta=(DisplayName = "Render CustomDepth Pass", LandscapeOverridable))
801 uint32 bRenderCustomDepth:1;
802
804 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category = Rendering, meta = (editcondition = "bRenderCustomDepth", LandscapeOverridable))
805 ERendererStencilMask CustomDepthStencilWriteMask;
806
808 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Rendering, meta=(UIMin = "0", UIMax = "255", editcondition = "bRenderCustomDepth", DisplayName = "CustomDepth Stencil Value", LandscapeOverridable))
809 int32 CustomDepthStencilValue;
810
812 UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Rendering, meta = (DisplayName = "Desired Max Draw Distance", LandscapeOverridable))
813 float LDMaxDrawDistance;
814
816 UPROPERTY(EditAnywhere, Category=Lightmass, meta = (LandscapeInherited))
817 FLightmassPrimitiveSettings LightmassSettings;
818
819 // Landscape LOD to use for collision tests. Higher numbers use less memory and process faster, but are much less accurate
820 UPROPERTY(EditAnywhere, Category=Collision, meta = (LandscapeOverridable))
821 int32 CollisionMipLevel;
822
823 // If set higher than the "Collision Mip Level", this specifies the Landscape LOD to use for "simple collision" tests, otherwise the "Collision Mip Level" is used for both simple and complex collision.
824 UPROPERTY(EditAnywhere, Category=Collision, meta = (LandscapeOverridable))
825 int32 SimpleCollisionMipLevel;
826
828 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Collision, meta = (LandscapeOverridable))
829 FBodyInstance BodyInstance;
830
838 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Collision, meta = (LandscapeOverridable))
839 uint32 bGenerateOverlapEvents : 1;
840
842 UPROPERTY(EditAnywhere, AdvancedDisplay, Category=Collision, meta = (LandscapeInherited))
844
845#if WITH_EDITORONLY_DATA
846 UE_DEPRECATED(all, "TargetLayers will be used instead")
847 UPROPERTY()
849
850 UPROPERTY()
852
854 UPROPERTY()
856
858 UE_DEPRECATED(all, "TargetLayers will be used instead")
859 UPROPERTY()
862
865
867 UPROPERTY(Transient, NonTransactional)
869
871 uint32 CurrentVersion = 1;
875
878
881
884#endif // WITH_EDITORONLY_DATA
885
888
890 bool bIsRegisteredWithSubsystem : 1 = false;
891
893 UPROPERTY(Transient, DuplicateTransient, NonTransactional, SkipSerialization)
895
898 int32 ComponentSizeQuads; // Total number of quads in each component
899
901 int32 SubsectionSizeQuads; // Number of quads for a subsection of a component. SubsectionSizeQuads+1 must be a power of two.
902
904 int32 NumSubsections; // Number of subsections in X and Y axis
905
907 UPROPERTY(EditAnywhere, Category=Navigation, meta = (LandscapeOverridable))
909
911 UPROPERTY(EditAnywhere, Category = Navigation, meta = (LandscapeOverridable))
913
914 UPROPERTY(EditAnywhere, Category = Navigation, AdvancedDisplay, meta = (LandscapeOverridable))
916
918 UPROPERTY(EditAnywhere, Category = Landscape, meta = (LandscapeOverridable))
920
921#if WITH_EDITORONLY_DATA
922 UPROPERTY(EditAnywhere, Category=Landscape, meta = (LandscapeOverridable))
923 int32 MaxPaintedLayersPerComponent; // 0 = disabled
924#endif // WITH_EDITORONLY_DATA
925
927 UPROPERTY(EditAnywhere, Category = HLOD, meta = (LandscapeOverridable))
929
930#if WITH_EDITORONLY_DATA
932 UPROPERTY(EditAnywhere, Category = HLOD, meta = (DisplayName = "HLOD Texture Size Policy", LandscapeOverridable, EditCondition = "HLODMaterialOverride == nullptr"))
934
936 UPROPERTY(EditAnywhere, Category = HLOD, meta = (DisplayName = "HLOD Texture Size", LandscapeOverridable, EditCondition = "HLODMaterialOverride == nullptr && HLODTextureSizePolicy == ELandscapeHLODTextureSizePolicy::SpecificSize", ClampMin = "16", ClampMax = "8192"))
938
940 UPROPERTY(EditAnywhere, Category = HLOD, meta = (DisplayName = "HLOD Material Override", LandscapeOverridable))
942
944 UPROPERTY(EditAnywhere, Category = HLOD, meta = (DisplayName = "HLOD Mesh Source LOD Policy", LandscapeOverridable))
946
948 UPROPERTY(EditAnywhere, Category = HLOD, meta = (DisplayName = "HLOD Mesh Source LOD", LandscapeOverridable, EditCondition = "HLODMeshSourceLODPolicy == ELandscapeHLODMeshSourceLODPolicy::SpecificLOD", ClampMin = "0"))
950#endif
951
952 UE_DEPRECATED(5.7, "Non-edit layer landscapes are deprecated, all landscapes use the edit layer system now.")
953 UPROPERTY()
955
956 UE_DEPRECATED(5.7, "Non-edit layer landscapes are deprecated, all landscapes use the edit layer system now.")
958
959 UE_DEPRECATED(5.6, "This has been replaced by the per-platform CVar landscape.HeightmapCompressionMode")
960 UPROPERTY()
962
964 UPROPERTY(EditAnywhere, Category = Landscape, AdvancedDisplay, meta = (LandscapeOverridable))
966
968 UPROPERTY(EditAnywhere, Category = Landscape, AdvancedDisplay, meta = (LandscapeOverridable))
970
972 UPROPERTY(EditAnywhere, Category = Landscape, AdvancedDisplay, meta = (LandscapeOverridable))
974
976 UPROPERTY(EditAnywhere, Category = Landscape, AdvancedDisplay, meta = (LandscapeOverridable))
978
979#if WITH_EDITOR
981
982 UE_DEPRECATED(5.6, "Use ULandscapeSubsystem::OnLandscapeProxyComponentDataChanged")
984#endif // WITH_EDITOR
985
986#if WITH_EDITORONLY_DATA
989#endif // WITH_EDITORONLY_DATA
990
991 // Blueprint functions
992
994 UFUNCTION(BlueprintCallable, Category = "Rendering", meta=(DeprecatedFunction, DeprecationMessage = "This value can't be changed anymore, you should edit the property LODDistributionSetting of the Landscape"))
996
997 UFUNCTION(BlueprintCallable, Category = "Rendering", meta = (DeprecatedFunction, DeprecationMessage = "This value can't be changed anymore and has been ineffective for several versions now. Please stop using it"))
999
1000 /* Setter for LandscapeMaterial. Has no effect outside the editor. */
1001 UFUNCTION(BlueprintSetter)
1003
1004 // Editor-time blueprint functions
1005
1020 UFUNCTION(BlueprintCallable, Category = "Landscape|Editor")
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(""));
1022
1024 UFUNCTION(BlueprintCallable, Category = "Landscape|Runtime|Material")
1026
1028 UFUNCTION(BlueprintCallable, meta = (Keywords = "SetColorParameterValue"), Category = "Landscape|Runtime|Material")
1030
1032 UFUNCTION(BlueprintCallable, meta = (Keywords = "SetFloatParameterValue"), Category = "Landscape|Runtime|Material")
1034
1035 // End blueprint functions
1036
1037 //~ Begin AActor Interface
1038 virtual void PostRegisterAllComponents() override;
1039 virtual void UnregisterAllComponents(bool bForReregister = false) override;
1040 virtual bool IsLevelBoundsRelevant() const override { return true; }
1041
1042 virtual void FinishDestroy() override;
1043
1044#if WITH_EDITOR
1045 virtual void RerunConstructionScripts() override {}
1046 virtual void Destroyed() override;
1047 virtual void EditorApplyScale(const FVector& DeltaScale, const FVector* PivotLocation, bool bAltDown, bool bShiftDown, bool bCtrlDown) override;
1048 virtual void EditorApplyMirror(const FVector& MirrorScale, const FVector& PivotLocation) override;
1049 virtual void PostEditMove(bool bFinished) override;
1050 virtual void OnLoadedActorRemovedFromLevel() override;
1051 //~ End AActor Interface
1052
1053 virtual uint32 GetDefaultGridSize(UWorld* InWorld) const override { return 1; }
1054 virtual FGuid GetGridGuid() const override { return LandscapeGuid; }
1056 virtual bool EditorCanAttachTo(const AActor* InParent, FText& OutReason) const override { return false; }
1057 virtual bool GetReferencedContentObjects(TArray<UObject*>& Objects) const override;
1058 virtual bool IsNaniteEnabled() const { return bEnableNanite; }
1059 virtual int32 GetNaniteLODIndex() const { return NaniteLODIndex; }
1060 virtual bool IsNaniteSkirtEnabled() const { return bNaniteSkirtEnabled; }
1061 virtual float GetNaniteSkirtDepth() const { return NaniteSkirtDepth; }
1062 virtual int32 GetNanitePositionPrecision() const { return NanitePositionPrecision; }
1063 virtual float GetNaniteMaxEdgeLengthFactor() const { return NaniteMaxEdgeLengthFactor; }
1065
1069 static constexpr int32 NaniteComponentMaxSide = 8;
1072#endif //WITH_EDITOR
1073
1075 bool HasNaniteComponents() const { return !NaniteComponents.IsEmpty(); }
1078 bool AuditNaniteMaterials() const;
1080
1083
1085 LANDSCAPE_API void GetHeightValues(int32& SizeX, int32& SizeY, TArray<float>& ArrayValue) const;
1086
1087 /* Return the landscape guid, used to identify landscape proxies (and splines) that belong to the same landscape, even across world partitions.
1088 * Also used as the world partition grid guid. This value may be modified when the landscape is instanced, to allow multiple instances of the same
1089 * landscape to exist simultaneously. If you want the original (uninstanced) value, use GetOriginalLandscapeGuid().
1090 */
1091 virtual FGuid GetLandscapeGuid() const override { return LandscapeGuid; }
1092 void SetLandscapeGuid(const FGuid& Guid, bool bValidateGuid = true)
1093 {
1094 // we probably shouldn't be setting the landscape guid on instanced landscapes
1095 check(!bValidateGuid || (OriginalLandscapeGuid == LandscapeGuid) || !OriginalLandscapeGuid.IsValid());
1096 LandscapeGuid = Guid;
1098 }
1099
1103
1104 /* Return the original landscape guid, before it was modified by instancing.
1105 * When not instanced, this value is equal to LandscapeGuid.
1106 */
1107 const FGuid& GetOriginalLandscapeGuid() const { return OriginalLandscapeGuid; }
1108
1110
1111 UFUNCTION(BlueprintCallable, Category = "Landscape|Runtime")
1112 virtual ALandscape* GetLandscapeActor() PURE_VIRTUAL(GetLandscapeActor, return nullptr;)
1113 virtual const ALandscape* GetLandscapeActor() const PURE_VIRTUAL(GetLandscapeActor, return nullptr;)
1114
1117
1118 static void SetGrassUpdateInterval(int32 Interval) { GrassUpdateInterval = Interval; }
1119
1120 /* Determine whether we should update dynamic grass instances this update tick */
1121 FORCEINLINE bool ShouldTickGrass() const
1122 {
1123 // don't tick grass if there's no grass to tick
1124 if (!GrassTypeSummary.bHasAnyGrass)
1125 {
1126 return false;
1127 }
1128
1129 const int32 UpdateInterval = GetGrassUpdateInterval();
1130 if (UpdateInterval > 1)
1131 {
1132 if ((GFrameNumber + FrameOffsetForTickInterval) % uint32(UpdateInterval))
1133 {
1134 return false;
1135 }
1136 }
1137
1138 return true;
1139 }
1141
1146
1154 LANDSCAPE_API void UpdateGrass(const TArray<FVector>& Cameras, bool bForceSync = false);
1155
1156
1162 // TODO [jonathan.bard] : Rename to "AddGrassExclusionBox" + no reason for any of this to be static
1169
1174
1175 static void RemoveInvalidExclusionBoxes();
1176
1177 static void DebugDrawExclusionBoxes(const UWorld* World);
1178
1179 /* Invalidate the precomputed grass and baked texture data for the specified components */
1182
1183 /* Invalidate the precomputed grass and baked texture data on all components */
1185
1187
1188#if WITH_EDITOR
1197
1200
1203
1204 FGuid GetNaniteContentId() const;
1205#endif // WITH_EDITOR
1206
1207 //~ Begin UObject Interface.
1208#if WITH_EDITOR
1209 virtual void BeginCacheForCookedPlatformData(const ITargetPlatform* TargetPlatform) override;
1210 virtual void OnCookEvent(UE::Cook::ECookEvent CookEvent, UE::Cook::FCookEventContext& CookContext) override;
1211#endif // WITH_EDITOR
1212
1213 virtual void PreSave(FObjectPreSaveContext ObjectSaveContext) override;
1214 virtual void Serialize(FArchive& Ar) override;
1215 static void AddReferencedObjects(UObject* InThis, FReferenceCollector& Collector);
1216 virtual void PostLoad() override;
1217
1220 virtual LANDSCAPE_API ULandscapeInfo* GetLandscapeInfo() const override;
1221
1223 virtual LANDSCAPE_API FTransform LandscapeActorToWorld() const override;
1224
1227
1235 UFUNCTION(BlueprintCallable, meta = (DisplayName = "Landscape Export Heightmap to RenderTarget", Keywords = "Push Landscape Heightmap to RenderTarget", UnsafeDuringActorConstruction = "true"), Category = Rendering)
1237
1238 UE_DEPRECATED(5.7, "Use GetSectionBase instead.")
1240
1242 LANDSCAPE_API FIntPoint GetSectionBase() const;
1243
1244 // ILandscapeSplineInterface
1245 virtual ULandscapeSplinesComponent* GetSplinesComponent() const override { return SplineComponent; }
1246 LANDSCAPE_API virtual void UpdateSharedProperties(ULandscapeInfo* InLandscapeInfo) override;
1247 virtual bool IsSplineOwnerValid() const override { return true; }
1248
1249 // Retrieve the screen size at which each LOD should be rendered
1250 LANDSCAPE_API TArray<float> GetLODScreenSizeArray() const;
1251
1252#if WITH_EDITOR
1253 // Copy properties from parent Landscape actor
1254 LANDSCAPE_API void CopySharedProperties(ALandscapeProxy* InLandscape);
1255
1262
1263 // Returns true if the property is shared.
1265
1266 // Returns true if the property is shared.
1268
1269 // Returns true if the property is inherited.
1271
1272 // Returns true if the property is overridable
1274
1275 // Returns true if the shared property is overridden by the object.
1276 virtual bool IsSharedPropertyOverridden(const FName& InPropertyName) const { return false; }
1277
1278 // Modifies the override state of the property given as argument.
1279 virtual void SetSharedPropertyOverride(const FName& InPropertyName, const bool bIsOverriden) { }
1280
1282 static FOnLandscapeProxyFixupSharedDataDelegate::RegistrationType& OnLandscapeProxyFixupSharedData() { return OnLandscapeProxyFixupSharedDataDelegate; }
1283#endif // WITH_EDITOR
1284
1285 // Get Landscape Material assigned to this Landscape
1286 virtual UMaterialInterface* GetLandscapeMaterial(int8 InLODIndex = INDEX_NONE) const;
1287
1288 // Get Hole Landscape Material assigned to this Landscape
1289 virtual UMaterialInterface* GetLandscapeHoleMaterial() const;
1290
1291#if WITH_EDITOR
1292 /* Serialize all hashes/guids that record the current state of this proxy */
1294
1295 void SetSplinesComponent(ULandscapeSplinesComponent* InSplineComponent) { check(!SplineComponent || (SplineComponent == InSplineComponent)); SplineComponent = InSplineComponent; }
1296
1297 virtual bool SupportsForeignSplineMesh() const override { return true; }
1298
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")
1313 LANDSCAPE_API virtual void CreateSplineComponent() override;
1314 LANDSCAPE_API virtual void CreateSplineComponent(const FVector& Scale3D) override;
1315
1316 virtual bool CanEditChange(const FProperty* InProperty) const override;
1317 virtual void PostTransacted(const FTransactionObjectEvent& InTransactionEvent) override;
1318 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
1319 virtual void PostEditImport() override;
1320 virtual void PostEditUndo() override;
1321 //~ End UObject Interface
1322
1327
1330
1331 // Get all Layer names used by the materials assigned the proxy and components (Proxy Material, Component, Component LOD Material and Hole Material)
1333
1334 // Query all the LandscapeLayerInfo Objects from the weight layers allocated on this proxy.
1336
1337 UE_DEPRECATED(5.6, "This create function is deprecated. Please use new util UE::Landscape::CreateTargetLayerInfo instead.")
1339
1340 UE_DEPRECATED(5.6, "This create function is deprecated. Please use new util UE::Landscape::CreateTargetLayerInfo instead.")
1342
1343 UE_DEPRECATED(5.6, "This create function is deprecated. Please use new util UE::Landscape::CreateTargetLayerInfo instead.")
1345
1347 void FixupWeightmaps();
1348
1350 void RepairInvalidTextures();
1351
1352 // Remove Invalid weightmaps
1354
1355 // Changed Physical Material
1357
1358 // Converts shared properties overridden before explicit override, asking the user how to proceed.
1360
1361 // Displays the obsolete edit layers within the LandscapeComponents in a actionable MapCheck log
1362 // Asks users to copy obsolete layer data or delete for good.
1364
1365 // Assign only mismatching data and mark proxy package dirty
1367
1368 UE_DEPRECATED(5.7, "Use SetSectionBase instead.")
1370
1372 LANDSCAPE_API void SetSectionBase(FIntPoint SectionOffset);
1373
1376
1378 LANDSCAPE_API void RecreateComponentsRenderState(TFunctionRef<void(ULandscapeComponent*)> Fn);
1379
1382
1385
1387 void UpdateNaniteMaterials();
1388
1392
1396
1401
1403 {
1404 static constexpr int32 MaxUVCount = 6;
1405
1407 enum class EUVMappingType : uint8
1408 {
1409 None,
1410 //RelativeToBoundsUV, /** Only valid when ExportBounds is set : normalized UVs spanning the export bounds, i.e. (0,0) at the bottom left corner of ExportBounds -> (1,1) at the top right corner of ExportBounds. */
1411 // TODO [jonathan.bard] : RelativeToComponentsBoundsUV, /** Only valid when ComponentsToExport is set : normalized UVs spanning the ComponentToExport's bounds, i.e. (0,0) at the bottom left corner of those components' lower left component -> (1,1) at the top right corner of those components' upper right component */
1413 // TODO[jonathan.bard] : RelativeToLandscapeBoundsUV, /** Normalized UVs spanning the entire landscape bounds, i.e. (0,0) at the bottom left corner of the landscape's lower left landscape component -> (1,1) at the top right corner of the landscape's upper right component */
1414 HeightmapUV,
1415 WeightmapUV,
1419 LightmapUV,
1421 Num
1422 };
1423
1425 struct FUVConfiguration
1426 {
1429
1430 public:
1431 // Index 0 = UVChannel 0, Index 1 = UVChannel 1...
1433 };
1434
1435 enum class EExportCoordinatesType : uint8
1436 {
1437 Absolute,
1439 // TODO [jonathan.bard] : RelativeToComponentsBounds,
1440 // TODO [jonathan.bard] : RelativeToProxyBounds,
1441 // TODO [jonathan.bard] : RelativeToLandscapeBounds,
1442 };
1443
1444 public:
1445 FRawMeshExportParams() = default;
1447 LANDSCAPE_API const FName& GetMaterialSlotName(int32 InComponentIndex) const;
1449
1450 public:
1453
1456
1458 EExportCoordinatesType ExportCoordinatesType = EExportCoordinatesType::Absolute;
1459
1461 FName MaterialSlotName = TEXT("LandscapeMat");
1462
1465
1468
1471
1474
1477 };
1478
1487
1489
1491
1493
1496
1502
1505
1512
1519
1522
1525
1528
1531
1534
1536 LANDSCAPE_API void RemoveOverlappingComponent(ULandscapeComponent* Component);
1537
1543
1551 UFUNCTION(BlueprintCallable, meta = (DisplayName = "Landscape Import Heightmap from RenderTarget", Keywords = "Push RenderTarget to Landscape Heightmap", UnsafeDuringActorConstruction = "true"), Category = Rendering)
1553
1558 UFUNCTION(BlueprintCallable, meta = (DisplayName = "Landscape Import Weightmap from RenderTarget", Keywords = "Push RenderTarget to Landscape Weightmap", UnsafeDuringActorConstruction = "true"), Category = Rendering)
1560
1561 UE_DEPRECATED(5.7, "Deprecating placeholder function. Not needed after non-edit layer landscape deprecation. ")
1562 UFUNCTION()
1564
1566 UE_DEPRECATED(5.6, "Use ULandscapeSubsystem::OnLandscapeProxyMaterialChanged")
1568 {
1572 }
1573
1574 UE_DEPRECATED(5.7, "Non-edit layer landscapes are deprecated, all landscapes use the edit layer system now.")
1576
1577 UE_DEPRECATED(5.7, "Non-edit layer landscapes are deprecated, all landscapes use the edit layer system now.")
1579
1580 UE_DEPRECATED(5.7, "Non-edit layer landscapes are deprecated, all landscapes use the edit layer system now.")
1582
1584
1588 UFUNCTION(BlueprintCallable, Category = "Landscape")
1590
1591 // TargetLayer API Start
1592 // ---------------------
1593
1594 // Add a TargetLayer with a unique name and no layer object info
1596
1597 // Add a TargetLayer with the given name or a generated unique name if the given name is invalid
1599
1600 // Generate a unique TargetLayer name
1602
1603 // Update a existing Target Layer
1605
1606 // Remove Named TargetLayer,
1607 // Returns true if a layer has been removed.
1609
1610 // Query if a TargetLayer exists by Name or by checking the ULandscapeLayerInfoObject in TargetLayerSettings
1611 LANDSCAPE_API bool HasTargetLayer(const FName& Name) const;
1613 LANDSCAPE_API bool HasTargetLayer(const ULandscapeLayerInfoObject* LayerInfoObject) const;
1614
1615 // All the Target layers
1618
1619 // TargetLayer API End
1620 // -------------------
1621protected:
1622 friend class ALandscape;
1623
1627 LANDSCAPE_API bool AddLayer(const FGuid& InLayerGuid);
1628
1632
1638
1639 UE_DEPRECATED(5.7, "Use RemoveObsoleteEditLayers based on ALandscape or use DeleteLayer to directly remove layers")
1641
1642 // Returns a map of this Proxy's LandscapeComponents obsolete edit layers Guids to Debug Names
1644
1647
1650
1657
1658protected:
1659 UE_DEPRECATED(5.6, "Use ULandscapeSubsystem::OnLandscapeProxyComponentDataChanged")
1661
1662 // Used to know if the deprecation of shared properties modified before the enforcement system introduction has been performed on load.
1664#endif // WITH_EDITOR
1665private:
1666
1667 UPROPERTY(Category = "Target Layers", VisibleAnywhere, meta = (NoResetToDefault, LandscapeInherited) )
1669
1672 {
1673#if WITH_EDITOR
1674 // When editing landscape, force update interval to be every frame
1676 {
1677 return 1;
1678 }
1679#endif
1680 return GrassUpdateInterval;
1681 }
1683
1685
1686#if WITH_EDITOR
1688 void CreateNaniteComponents(int32 NumComponents);
1689
1695
1697#endif
1698
1700
1701#if WITH_EDITOR
1702 void InstallOrUpdateTextureUserDatas(const ITargetPlatform* TargetPlatform);
1703#endif // WITH_EDITOR
1704
1705#if WITH_EDITORONLY_DATA
1706public:
1708
1709 inline bool HasEditLayersDataOnLoad() const
1710 {
1711 return bHasEditLayersOnLoad;
1712 }
1713
1714private:
1718#endif // WITH_EDITORONLY_DATA
1719
1721 UPROPERTY()
1722 FIntPoint SectionBase = FIntPoint::ZeroValue;
1723
1726
1727#if WITH_EDITOR
1728 static constexpr TCHAR const* LandscapeInheritedTag = TEXT("LandscapeInherited");
1729 static constexpr TCHAR const* LandscapeOverridableTag = TEXT("LandscapeOverridable");
1730#endif // WITH_EDITOR
1731};
1732
1733
1734#if WITH_EDITOR
1739{
1740public:
1742 UE_DEPRECATED(5.6, "Use the function with the EBuildFlags param")
1743 LANDSCAPE_API void Build();
1744 LANDSCAPE_API void Build(UE::Landscape::EBuildFlags InBuildFlags);
1745 UE_DEPRECATED(5.6, "Use the Build function with UE::Landscape::EBuildFlags::ForceRebuild")
1746 LANDSCAPE_API void Rebuild();
1748private:
1749 UWorld* World;
1751};
1752
1757{
1758public:
1760 LANDSCAPE_API void ForEachComponent(TFunctionRef<void(const ULandscapeComponent*)> Func) const;
1761 const TArray<ULandscapeComponent*>& GetComponents() const { return Components; }
1762
1763private:
1765};
1766
1768#endif
OODEFFUNC typedef const int const char * function
Definition oodle2.h:710
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define FORCEINLINE
Definition AndroidPlatform.h:140
#define check(expr)
Definition AssertionMacros.h:314
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
FPlatformTypes::int8 int8
An 8-bit signed integer.
Definition Platform.h:1121
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#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
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
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
@ Num
Definition MetalRHIPrivate.h:234
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
uint8_t uint8
Definition binka_ue_file_header.h:8
uint16_t uint16
Definition binka_ue_file_header.h:7
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Actor.h:257
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 Text.h:385
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 Array.h:670
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 Level.h:423
Definition MaterialInstanceConstant.h:21
Definition MaterialInterface.h:296
Definition Object.h:95
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 World.h:918
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 Guid.h:109
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
Definition Color.h:48
static constexpr UE_FORCEINLINE_HINT T DivideAndRoundUp(T Dividend, T Divisor)
Definition UnrealMathUtility.h:694
Definition MeshDescription.h:94
Definition LandscapeLayerInfoObject.h:17
Definition PerPlatformProperties.h:211
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
Definition IntPoint.h:25