ULandscapeInfo

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Landscape

Header

/Engine/Source/Runtime/Landscape/Classes/LandscapeInfo.h

Include

#include "LandscapeInfo.h"

Syntax

class ULandscapeInfo : public UObject

Variables

Name Description

Public variable

int32

 

ComponentNumSubsections

Public variable

int32

 

ComponentSizeQuads

Public variable

FVector

 

DrawScale

Public variable

TLazyObjectPtr<...

 

LandscapeActor

Public variable

FGuid

 

LandscapeGuid

Public variable

TArray< FLandsc...

 

Layers

Public variable

TArray< TObject...

 

Proxies

Public variable

TMap< FIntPoint...

 

SelectedRegion

Public variable

int32

 

SubsectionSizeQuads

Public variable

TMap< FIntPoint...

 

XYtoAddCollisionMap

Lookup map used by the "add component" tool.

Public variable

TMap< FIntPoint...

 

XYtoCollisionComponentMap

Map of the offsets (in component space) to the collision components. Should always be valid.

Public variable

TMap< FIntPoint...

 

XYtoComponentMap

Map of the offsets (in component space) to the component. Valid in editor only.

Constructors

Name Description

Public function

ULandscapeInfo

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

bool

 

ApplySplines

(
    bool bOnlySelected,
    TSet< TObjectPtr< ULandscapeCompone...,
    bool bMarkPackageDirty
)

Public function Const

bool

 

AreAllComponentsRegistered()

Public function Const

bool

 

CanDeleteLandscape

(
    FText& OutReason
)

Public function Const

bool

 

CanHaveLayersContent()

Will tell if the landscape actor can have some content related to the layer system

Public function

void

 

ClearDirtyData()

Will clear all component dirty data

Public function

void

 

ClearSelectedRegion

(
    bool bIsComponentwise
)

Public function

void

 

CreateLayerEditorSettingsFor

(
    ULandscapeLayerInfoObject* Lay...
)

Public function

ALandscapeSp...

 

CreateSplineActor

(
    const FVector& Location
)

Public function

void

 

DeleteLayer

(
    ULandscapeLayerInfoObject* Lay...,
    const FName& LayerName
)

Public function

void

 

ExportHeightmap

(
    const FString& Filename,
    const FIntRect& ExportRegion
)

Public function

void

 

ExportHeightmap

(
    const FString& Filename
)

Public function

void

 

ExportLayer

(
    ULandscapeLayerInfoObject* Lay...,
    const FString& Filename,
    const FIntRect& ExportRegion
)

Public function

void

 

ExportLayer

(
    ULandscapeLayerInfoObject* Lay...,
    const FString& Filename
)

Public function Static

ULandscapeIn...

 

Find

(
    UWorld* InWorld,
    const FGuid& LandscapeGuid
)

Public function Static

ULandscapeIn...

 

FindOrCreate

(
    UWorld* InWorld,
    const FGuid& LandscapeGuid
)

Public function

void

 

FixupProxiesTransform

(
    bool bDirty
)

Fixes up proxies relative position to landscape actor basically makes sure that each LandscapeProxy RootComponent transform reflects LandscapeSectionOffset value requires LandscapeActor to be loaded Does not work in World composition mode!

Public function Const

void

 

ForAllLandscapeComponents

(
    TFunctionRef< void...
)

Public function Const

void

 

ForAllLandscapeProxies

(
    TFunctionRef< void ...
)

Runs the given function on the root landscape actor and all streaming proxies Most easily used with a lambda as follows: ForAllLandscapeProxies( { Code });

Public function Const

void

 

ForAllSplineActors

(
    TFunctionRef< void...
)

Public function

void

 

ForceLayersFullUpdate()

Public function Const

FBox

 

GetCompleteBounds()

Public function Const

void

 

GetComponentsInRegion

(
    int32 X1,
    int32 Y1,
    int32 X2,
    int32 Y2,
    TSet< ULandscapeComponent* >&...,
    bool bOverlap
)

Public function Const

ALandscapePr...

 

GetCurrentLevelLandscapeProxy

(
    bool bRegistered
)

Returns landscape which is spawned in the current level that was previously added to this landscape info object

Public function Const

uint32

 

GetGridSize

(
    uint32 InGridSizeInComponents
)

Returns LandscapeStreamingProxy Cell Size in WorldPartition

Public function

FVector

 

GetLandscapeCenterPos

(
    float& LengthZ,
    int32 MinX,
    int32 MinY,
    int32 MaxX,
    int32 MaxY
)

Public function Const

bool

 

GetLandscapeExtent

(
    int32& MinX,
    int32& MinY,
    int32& MaxX,
    int32& MaxY
)

Public function Const

bool

 

GetLandscapeExtent

(
    ALandscapeProxy* Proxy,
    FIntRect& ProxyExtent
)

Public function Const

bool

 

GetLandscapeExtent

(
    FIntRect& LandscapeExtent
)

Public function Const

ALandscapePr...

 

GetLandscapeProxy()

Returns shared landscape or landscape proxy, mostly for transformations

Public function Const

ALandscapePr...

 

GetLandscapeProxyForLevel

(
    ULevel* Level
)

Returns the landscape proxy of this landscape info in the given level (if it exists)

Public function Const

FLandscapeEd...

 

GetLayerEditorSettings

(
    ULandscapeLayerInfoObject* Lay...
)

Public function Const

ULandscapeLa...

 

GetLayerInfoByName

(
    FName LayerName,
    ALandscapeProxy* Owner
)

Public function Const

int32

 

GetLayerInfoIndex

(
    FName LayerName,
    ALandscapeProxy* Owner
)

Public function Const

int32

 

GetLayerInfoIndex

(
    ULandscapeLayerInfoObject* Lay...,
    ALandscapeProxy* Owner
)

Public function Const

FBox

 

GetLoadedBounds()

Public function Const

TSet< ULands...

 

GetSelectedComponents()

Public function Const

bool

 

GetSelectedExtent

(
    int32& MinX,
    int32& MinY,
    int32& MaxX,
    int32& MaxY
)

Public function Const

TSet< ULands...

 

GetSelectedRegionComponents()

Public function Const

TArray< TScr...

 

GetSplineActors()

Public function Const

void

 

GetUsedPaintLayers

(
    const FGuid& InLayerGuid,
    TArray< ULandscapeLayerInfoObject&...
)

Public function Const

bool

 

HasUnloadedComponentsInRegion

(
    int32 X1,
    int32 Y1,
    int32 X2,
    int32 Y2
)

Public function

void

 

Initialize

(
    UWorld* InWorld,
    const FGuid& InLandscapeGuid
)

Called after creating object so that it can initialize its state

Public function

bool

 

IsValidPosition

(
    int32 X,
    int32 Y
)

Public function

ALandscapePr...

 

MoveComponentsToLevel

(
    const TArray< ULandscapeComponent&...,
    ULevel* TargetLevel,
    FName NewProxyName
)

Moves Components to target level.

Public function

ALandscapePr...

 

MoveComponentsToProxy

(
    const TArray< ULandscapeComponent&...,
    ALandscapeProxy* LandscapeProx...,
    bool bSetPositionAndOffset,
    ULevel* TargetLevel
)

Moves Components to target proxy.

Public function

void

 

MoveSpline

Moves Splines connected to this control point to target Proxy.

Public function

void

 

MoveSplines

Moves all Splines to target Spline owner.

Public function

void

 

MoveSplinesToLevel

(
    ULandscapeSplinesComponent* In...,
    ULevel* TargetLevel
)

Moves all Splines to target level.

Public function

void

 

MoveSplinesToProxy

(
    ULandscapeSplinesComponent* In...,
    ALandscapeProxy* InLandscapePr...
)

Moves all Splines to target Proxy. Creates ULandscapeSplineComponent if needed

Public function

void

 

MoveSplineToLevel

(
    ULandscapeSplineControlPoint* ...,
    ULevel* TargetLevel
)

Moves Splines connected to this control point to target level.

Public function

void

 

MoveSplineToProxy

(
    ULandscapeSplineControlPoint* ...,
    ALandscapeProxy* InLandscapePr...
)

Moves Splines connected to this control point to target Proxy.

Public function

void

 

PostponeTextureBaking()

Postpones landscape textures baking, usually used during landscape painting to avoid hitches

Public function

void

 

RecreateCollisionComponents()

Public function Static

void

 

RecreateLandscapeInfo

(
    UWorld* InWorld,
    bool bMapCheck
)

Recreate all LandscapeInfo objects in given world

Public function

void

 

RegisterActor

(
    ALandscapeProxy* Proxy,
    bool bMapCheck
)

Associates passed actor with this info object

Public function

void

 

RegisterActorComponent

(
    ULandscapeComponent* Component,
    bool bMapCheck
)

Associates passed landscape component with this info object

Public function

void

 

RegisterCollisionComponent

Server doesn't have ULandscapeComponent use CollisionComponents instead to get height on landscape

Public function

void

 

RegisterSplineActor

Public function

void

 

RemoveXYOffsets()

Public function

void

 

ReplaceLayer

(
    ULandscapeLayerInfoObject* Fro...,
    ULandscapeLayerInfoObject* ToL...
)

Public function

void

 

RequestSplineLayerUpdate()

Public function

void

 

Reset()

Resets all actors, proxies, components registrations

Public function Const

bool

 

SupportsLandscapeEditing()

Public function

void

 

UnregisterActor

(
    ALandscapeProxy* Proxy
)

Deassociates passed actor with this info object

Public function

void

 

UnregisterActorComponent

(
    ULandscapeComponent* Component
)

Deassociates passed landscape component with this info object

Public function

void

 

UnregisterCollisionComponent

Public function

void

 

UnregisterSplineActor

Public function

void

 

UpdateAddCollision

(
    FIntPoint LandscapeKey
)

Public function

void

 

UpdateAllAddCollisions()

Only for use by the "add component" tool. Todo - move into the tool?

Public function

void

 

UpdateAllComponentMaterialInstances

(
    bool bInInvalidateCombinationMateri...
)

Will call UpdateAllComponentMaterialInstances on all LandscapeProxies

Public function

void

 

UpdateComponentLayerAllowList()

Update per-component layer allow list to include the currently painted layers.

Public function

void

 

UpdateDebugColorMaterial()

Public function

bool

 

UpdateLayerInfoMap

(
    ALandscapeProxy* Proxy,
    bool bInvalidate
)

Public function

void

 

UpdateSelectedComponents

(
    TSet< ULandscapeComponent* >&...,
    bool bIsComponentwise
)

Overridden from UObject

Name Description

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.