Navigation
API > API/Runtime > API/Runtime/Landscape
| Name | ALandscape |
| Type | class |
| Header File | /Engine/Source/Runtime/Landscape/Classes/Landscape.h |
| Include Path | #include "Landscape.h" |
Syntax
UCLASS (MinimalAPI, ShowCategories=(Display, Movement, Collision, Lighting, LOD, Input),
HideCategories=(Mobility))
class ALandscape :
public ALandscapeProxy ,
public UE::Landscape::EditLayers::IEditLayerRendererProvider
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → APartitionActor → ALandscapeProxy → ALandscape
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ALandscape
(
const FObjectInitializer& ObjectInitializer |
Landscape.h |
Classes
| Name | Remarks |
|---|---|
| FLandscapeBlueprintBrushChangedDelegate |
Structs
| Name | Remarks |
|---|---|
| FLandscapeEdModeInfo | Information provided by LandscapeEdMode |
| FWaitingForResourcesNotificationHelper |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnEditLayersMergedDelegate | TMulticastDelegate_OneParam< void, const FOnLandscapeEditLayersMergedParams & > | Delegate that will be called whenever an edit layers merge is done | Landscape.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AffectsLandscapeActorDescProperty | FName | Landscape.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAreNewLandscapeActorsSpatiallyLoaded | bool | Landscape actor has authority on default streaming behavior for new actors : LandscapeStreamingProxies & LandscapeSplineActors | Landscape.h |
|
| bEnableEditorLayersTick | bool | Landscape.h |
|
|
| bGrassUpdateEnabled | bool | Used to temporarily disable Grass Update in Editor | Landscape.h | |
| bIncludeGridSizeInNameForLandscapeActors | bool | If true, LandscapeStreamingProxy actors have the grid size included in their name, for backward compatibility we also check the AWorldSettings::bIncludeGridSizeInNameForPartitionedActors | Landscape.h | |
| bUseGeneratedLandscapeSplineMeshesActors | bool | If true, WorldPartitionLandscapeSplineMeshesBuilder is responsible of generating partitioned actors of type ALandscapeSplineMeshesActor that will contain all landscape spline/controlpoints static meshes. | Landscape.h | |
| bWarnedGlobalMergeDimensionsExceeded | bool | Landscape.h |
|
|
| EditingLayer | FGuid | TODO this is used as shared global state for the landscape editor mode. FLandscapeToolStrokeBase::SetEditLayer should manage the shared editor state instead. | Landscape.h | |
| SelectedEditLayerIndex | int32 | Current Selected Edit Layer of this landscape. | Landscape.h |
|
| TargetDisplayOrder | ELandscapeLayerDisplayMode | Display Order mode for the targets | Landscape.h |
|
| TargetDisplayOrderList | TArray< FName > | Display Order of the targets | Landscape.h |
|
| TrackedStreamingInTextures | TArray< TWeakObjectPtr< UTexture2D > > | List of textures that are not fully streamed in yet (updated every frame to track textures that have finished streaming in) | Landscape.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bHasWarnedAboutInvalidShadingModel | bool | Landscape.h | ||
| bLandscapeLayersAreInitialized | bool | TODO [jonathan.bard] : remove : this isn't really used anymore. | Landscape.h |
|
| bLastPrepareTextureResourcesResult | bool | Landscape.h | ||
| bSplineLayerUpdateRequested | bool | Landscape.h |
|
|
| bWarnedLayerMergeResolution | bool | Landscape.h | ||
| LandscapeBlueprintBrushChangedDelegate | FLandscapeBlueprintBrushChangedDelegate | Landscape.h | ||
| LandscapeEditLayers | TArray< FLandscapeLayer > | Landscape.h | ||
| LandscapeEdMode | ILandscapeEdModeInterface * | Provides information from LandscapeEdMode | Landscape.h | |
| LandscapeEdModeInfo | FLandscapeEdModeInfo | Landscape.h | ||
| LandscapeSplinesAffectedComponents | TSet< TObjectPtr< ULandscapeComponent > > | Components affected by landscape splines (used to partially clear Layer Reserved for Splines) | Landscape.h |
|
| LastFlushedLayerUpdateFrame | uint32 | Landscape.h | ||
| LastPrepareTextureResourcesCalled | uint32 | Landscape.h | ||
| LayerContentUpdateModes | uint32 | Landscape.h |
|
|
| LayerUpdateCount | uint32 | Counter to detect re-entrance. | Landscape.h | |
| OnEditLayersMergedDelegate | FOnEditLayersMergedDelegate | Landscape.h | ||
| WaitingForEditLayerResourcesNotificationHelper | FWaitingForResourcesNotificationHelper | Landscape.h | ||
| WaitingForTexturesNotificationHelper | FWaitingForResourcesNotificationHelper | Non-stackable user notifications for landscape editor | Landscape.h | |
| WasCompilingShaders | bool | Landscape.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddBrushToLayer
(
int32 InLayerIndex, |
Landscape.h | ||
void AddLayersToProxy
(
ALandscapeProxy* InProxy |
Landscape.h | ||
virtual bool CanChangeIsSpatiallyLoadedFlag() |
Landscape.h | ||
virtual bool CanDeleteSelectedActor
(
FText& OutReason |
Landscape.h | ||
void ClearDirtyData
(
ULandscapeComponent* InLandscapeComponent |
Landscape.h | ||
void ClearEditLayer
(
const FGuid& InLayerGuid, |
Landscape.h | ||
void ClearEditLayer
(
int32 InLayerIndex, |
Landscape.h | ||
void ClearLayer
(
const FGuid& InLayerGuid, |
Landscape.h | ||
PRAGMA_DISABLE_DEPRECATION_WARNINGS void ClearLayer
(
int32 InLayerIndex, |
Landscape.h | ||
void ClearPaintLayer
(
int32 InLayerIndex, |
Landscape.h | ||
void ClearPaintLayer
(
const FGuid& InLayerGuid, |
Landscape.h | ||
void CollapseAllEditLayers() |
Landscape.h | ||
void CollapseLayer
(
int32 InLayerIndex |
Landscape.h | ||
FIntPoint ComputeComponentCounts() |
Landscape.h | ||
bool ComputeLandscapeLayerBrushInfo
(
FTransform& OutLandscapeTransform, |
Landscape.h | ||
void ConvertNonEditLayerLandscape() |
Landscape.h | ||
void CopyDataToEditLayer
(
ALandscapeProxy* InProxy, |
Copies edit layer data from each of the InProxy's landscape components to the given edit layer. | Landscape.h | |
void CopyOldDataToDefaultLayer
(
ALandscapeProxy* InProxy |
Landscape.h | ||
void CopyOldDataToDefaultLayer () |
Landscape.h | ||
void CreateDefaultLayer() |
Landscape.h | ||
int32 CreateLayer
(
FName InName, |
Creates a new edit layer @Param InName is the name of the new edit layer @Param InEditLayerClass is the class of the edit layer to create. | Landscape.h | |
bool DeleteLayer
(
int32 InLayerIndex |
Landscape.h | ||
void DeleteLayers() |
Landscape.h | ||
FLandscapeLayer * DuplicateLayerAndMoveBrushes
(
const FLandscapeLayer& InOtherLayer |
Landscape.h | ||
void EnableNaniteSkirts
(
bool bInEnable, |
Landscape.h | ||
ULandscapeEditLayerBase * FindEditLayerOfType
(
const TSubclassOf< ULandscapeEditLayerBase >& InLayerClass |
Landscape.h | ||
const ULandscapeEditLayerBase * FindEditLayerOfTypeConst
(
const TSubclassOf< ULandscapeEditLayerBase >& InLayerClass |
Landscape.h | ||
const FLandscapeLayer * FindLayerOfTypeConst
(
const TSubclassOf< ULandscapeEditLayerBase >& InLayerClass |
Landscape.h | ||
void FlushLayerContentThisFrame() |
Landscape.h | ||
void ForceLayersFullUpdate() |
Landscape.h |
|
|
void ForceUpdateLayersContent
(
bool bIntermediateRender |
Landscape.h | ||
void ForceUpdateLayersContent () |
Landscape.h | ||
void ForEachEditLayerConst
(
TFunctionRef< bool(const ULandscapeEditLayerBase*)> Fn |
Landscape.h | ||
void ForEachLayerConst
(
TFunctionRef< bool(const FLandscapeLayer&)> Fn |
Runs the given function on each edit layer, with the possibility of early exit Most easily used with a lambda as follows: ForEachLayerConst(const [FLandscapeLayer](API/Runtime/Landscape/FLandscapeLayer)& InLayer -> bool { return continueLoop ? true : false; }); | Landscape.h | |
| Landscape.h | |||
TArray< class ALandscapeBlueprintBrushBase * > GetBrushesForLayer
(
int32 InLayerIndex |
Landscape.h | ||
ALandscapeBlueprintBrushBase * GetBrushForLayer
(
int32 InLayerIndex, |
Landscape.h | ||
int32 GetBrushIndexForLayer
(
int32 InLayerIndex, |
Landscape.h | ||
int32 GetBrushLayer
(
const ALandscapeBlueprintBrushBase* InBrush |
Landscape.h | ||
float GetClampedLayerAlpha
(
float InAlpha, |
Landscape.h | ||
FBox GetCompleteBounds () |
Computes & returns bounds containing all landscape proxies (if any) or this landscape's bounds otherwise. | Landscape.h | |
const FGuid & GetEditingLayer() |
Landscape.h | ||
ULandscapeEditLayerBase * GetEditLayer
(
const FName& InLayerName |
Landscape.h | ||
ULandscapeEditLayerBase * GetEditLayer
(
const FGuid& InLayerGuid |
Landscape.h | ||
ULandscapeEditLayerBase * GetEditLayer
(
int32 InLayerIndex |
Landscape.h | ||
const ULandscapeEditLayerBase * GetEditLayerConst
(
const FName& InLayerName |
Landscape.h | ||
const ULandscapeEditLayerBase * GetEditLayerConst
(
const FGuid& InLayerGuid |
Landscape.h | ||
const ULandscapeEditLayerBase * GetEditLayerConst
(
int32 InLayerIndex |
Landscape.h | ||
const TArray< ULandscapeEditLayerBase * > GetEditLayers() |
Landscape.h | ||
const TArray< const ULandscapeEditLayerBase * > GetEditLayersConst() |
ULandscapeEditLayerBase accessors : both const and non-const versions are provided because the landscape listens to data changes on the edit layer object and can therefore react to any change | Landscape.h | |
TArray< ULandscapeEditLayerBase * > GetEditLayersOfType
(
const TSubclassOf< ULandscapeEditLayerBase >& InLayerClass |
Landscape.h | ||
TArray< const ULandscapeEditLayerBase * > GetEditLayersOfTypeConst
(
const TSubclassOf< ULandscapeEditLayerBase >& InLayerClass |
Landscape.h | ||
float GetLayerAlpha
(
int32 InLayerIndex, |
Landscape.h | ||
const FLandscapeLayer * GetLayerConst
(
const FGuid& InLayerGuid |
Landscape.h | ||
const FLandscapeLayer * GetLayerConst
(
int32 InLayerIndex |
Landscape.h | ||
const FLandscapeLayer * GetLayerConst
(
const FName& InLayerName |
Landscape.h | ||
uint8 GetLayerCount() |
Landscape.h | ||
int32 GetLayerIndex
(
FName InLayerName |
Landscape.h | ||
int32 GetLayerIndex
(
const FGuid& InLayerGuid |
Landscape.h | ||
TArrayView< const FLandscapeLayer > GetLayers() |
Landscape.h | ||
TArrayView< const FLandscapeLayer > GetLayersConst() |
FLandscapeLayer accessors : only the const version is provided because we don't want to let them be mutated freely without the landscape being aware. | Landscape.h | |
TArray< const FLandscapeLayer * > GetLayersOfTypeConst
(
const TSubclassOf< ULandscapeEditLayerBase >& InLayerClass |
Landscape.h | ||
FBox GetLoadedBounds() |
Computes & returns bounds containing all currently loaded landscape proxies (if any) or this landscape's bounds otherwise | Landscape.h | |
uint32 GetLODGroupKey() |
Landscape.h | ||
const int32 GetSelectedEditLayerIndex() |
Landscape.h | ||
| Retrieves the names of valid paint layers on this landscape (editor-only : returns nothing at runtime) @Param bInIncludeVisibilityLayer whether the visibility layer's name should be included in the list or not | Landscape.h |
|
|
void GetUsedPaintLayers
(
int32 InLayerIndex, |
Landscape.h | ||
void GetUsedPaintLayers
(
const FGuid& InLayerGuid, |
Landscape.h | ||
bool GetUseGeneratedLandscapeSplineMeshesActors() |
Landscape.h | ||
bool GetVisibilityLayerAllocationIndex() |
Landscape.h | ||
bool HasAllComponent() |
Landscape.h | ||
bool HasLandscapeEdMode() |
Landscape.h | ||
void InitializeLandscapeLayersWeightmapUsage() |
Landscape.h | ||
bool IsLayerBlendSubstractive
(
int32 InLayerIndex, |
Landscape.h | ||
bool IsLayerNameUnique
(
const FName& InName |
Landscape.h | ||
bool IsMaxLayersReached() |
Landscape.h | ||
virtual bool IsPartitionActorNameAffectedByDataLayers() |
Landscape.h | ||
bool IsUpToDate() |
Landscape.h | ||
bool IsValidRenderTargetFormatHeightmap
(
EPixelFormat InRenderTargetFormat, |
Landscape.h | ||
bool IsValidRenderTargetFormatWeightmap
(
EPixelFormat InRenderTargetFormat, |
Landscape.h | ||
void OnBlueprintBrushChanged() |
Landscape.h | ||
FLandscapeBlueprintBrushChangedDelegate & OnBlueprintBrushChangedDelegate() |
Landscape.h | ||
FOnEditLayersMergedDelegate::RegistrationType & OnEditLayersMerged() |
Landscape.h | ||
void OnLayerInfoSplineFalloffModulationChanged
(
const ULandscapeLayerInfoObject* InLayerInfo |
Landscape.h | ||
void OnPreSave() |
Landscape.h | ||
virtual void PostActorCreated() |
Landscape.h | ||
bool PrepareTextureResources
(
bool bInWaitForStreaming |
Landscape.h | ||
bool PrepareTextureResourcesLimited
(
bool bInWaitForStreaming |
Landscape.h | ||
void RegisterLandscapeEdMode
(
ILandscapeEdModeInterface* InLandscapeEdMode |
Landscape.h | ||
void RemoveBrush
(
ALandscapeBlueprintBrushBase* InBrush |
Landscape.h | ||
void RemoveBrushFromLayer
(
int32 InLayerIndex, |
Landscape.h | ||
void RemoveBrushFromLayer
(
int32 InLayerIndex, |
Landscape.h | ||
bool RenderHeightmap
(
FTransform InWorldTransform, |
Render the final heightmap in the requested top-down window as one -atlased- texture in the provided render target 2D Can be called at runtime. | Landscape.h |
|
bool RenderWeightmap
(
FTransform InWorldTransform, |
Render the final weightmap for the requested layer, in the requested top-down window, as one -atlased- texture in the provided render target 2D Can be called at runtime. | Landscape.h |
|
| Render the final weightmaps for the requested layers, in the requested top-down window, as one -atlased- texture in the provided render target (2D or 2DArray) Can be called at runtime. | Landscape.h |
|
|
bool ReorderLayer
(
int32 InStartingLayerIndex, |
Landscape.h | ||
bool ReorderLayerBrush
(
int32 InLayerIndex, |
Landscape.h | ||
void ReplaceLayerSubstractiveBlendStatus
(
ULandscapeLayerInfoObject* InFromLayerInfo, |
Landscape.h | ||
void RequestLayersContentUpdate
(
ELandscapeLayerUpdateMode InModeMask |
Landscape.h | ||
void RequestLayersContentUpdateForceAll
(
ELandscapeLayerUpdateMode InModeMask, |
Landscape.h | ||
void RequestLayersInitialization
(
bool bInRequestContentUpdate, |
Landscape.h | ||
void RequestSplineLayerUpdate() |
Landscape.h | ||
bool SelectiveRenderEditLayersHeightmaps
(
const FLandscapeEditLayerRenderHeightParams& InSelectiveRenderParams |
Landscape.h | ||
bool SelectiveRenderEditLayersWeightmaps
(
const FLandscapeEditLayerRenderWeightParams& InSelectiveRenderParams |
Landscape.h | ||
void SetDisableRuntimeGrassMapGeneration
(
bool bInDisableRuntimeGrassMapGeneration |
Landscape.h | ||
void SetEditingLayer
(
const FGuid& InLayerGuid |
Landscape.h | ||
void SetGrassUpdateEnabled
(
bool bInGrassUpdateEnabled |
Landscape.h | ||
void SetLayerAlpha
(
int32 InLayerIndex, |
Landscape.h | ||
void SetLayerBlendMode
(
int32 InLayerIndex, |
Landscape.h | ||
void SetLayerLocked
(
int32 InLayerIndex, |
Landscape.h | ||
void SetLayerName
(
int32 InLayerIndex, |
Landscape.h | ||
void SetLayerSubstractiveBlendStatus
(
int32 InLayerIndex, |
Landscape.h | ||
void SetLayerVisibility
(
int32 InLayerIndex, |
Landscape.h | ||
void SetLODGroupKey
(
uint32 InLODGroupKey |
Landscape.h | ||
void SetNanitePositionPrecision
(
int32 InPrecision, |
Set the target precision on nanite vertex position. | Landscape.h | |
void SetSelectedEditLayerIndex
(
const int32 InEditLayerIndex |
Landscape.h | ||
void SetUseGeneratedLandscapeSplineMeshesActors
(
bool bInEnabled |
Landscape.h | ||
virtual bool ShouldImport
(
FStringView ActorPropString, |
Landscape.h | ||
void ShowAllLayers() |
Landscape.h | ||
void ShowOnlySelectedLayer
(
int32 InLayerIndex |
Landscape.h | ||
void TickLayers
(
float DeltaTime |
Landscape.h | ||
void ToggleCanHaveLayersContent() |
Landscape.h | ||
void UnregisterLandscapeEdMode() |
Landscape.h | ||
void UpdateAllLandscapeSplines
(
const FGuid& InLayerGuid, |
Landscape.h | ||
void UpdateLandscapeSplines
(
const FGuid& InLayerGuid, |
Landscape.h | ||
void UpdateProxyLayersWeightmapUsage() |
Landscape.h | ||
void ValidateProxyLayersWeightmapUsage() |
Landscape.h |
Overridden from ALandscapeProxy
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DeleteUnusedLayers () |
Delete all unused layers in components. | Landscape.h | |
virtual const ALandscape * GetLandscapeActor () |
Landscape.h | ||
virtual ALandscape * GetLandscapeActor () |
Landscape.h | ||
virtual bool HasLayersContent() |
Landscape.h | ||
virtual void PostDuplicate
(
bool bDuplicateForPIE |
Landscape.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Landscape.h | ||
virtual void PostEditImport() |
Landscape.h | ||
virtual void PostEditMove
(
bool bFinished |
Landscape.h | ||
virtual void PostEditUndo() |
Landscape.h | ||
virtual void PostLoad() |
Landscape.h | ||
virtual void PostRegisterAllComponents() |
Landscape.h | ||
virtual void UpdateCachedHasLayersContent
(
bool bInCheckComponentDataIntegrity |
Landscape.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void CalcComponentIndicesNoOverlap
(
const int32 X1, |
Exclude Components with overlapped vertices X2/Y2 Coordinates are "inclusive" max values | Landscape.h | |
static void CalcComponentIndicesOverlap
(
const int32 X1, |
Include Components with overlapped vertices X2/Y2 Coordinates are "inclusive" max values | Landscape.h | |
static bool IsMaterialResourceCompiled
(
FMaterialResource* InMaterialResource, |
Landscape.h | ||
static bool IsUpdateFlagEnabledForModes
(
ELandscapeComponentUpdateFlag InFlag, |
Landscape.h | ||
static void SplitHeightmap
(
ULandscapeComponent* Comp, |
Landscape.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCanHaveLayersContent_DEPRECATED | bool | Landscape.h | ||
| HeightmapRTList_DEPRECATED | TArray< TObjectPtr< UTextureRenderTarget2D > > | Landscape.h |
|
|
| LandscapeLayers_DEPRECATED | TArray< FLandscapeLayer > | Landscape.h | ||
| LandscapeSplinesTargetLayerGuid_DEPRECATED | FGuid | Target Landscape Layer for Landscape Splines | Landscape.h | |
| WeightmapRTList_DEPRECATED | TArray< TObjectPtr< UTextureRenderTarget2D > > | Landscape.h |
|