Navigation
API > API/Runtime > API/Runtime/Landscape
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- ULandscapeInfo
References
| Module | Landscape |
| Header | /Engine/Source/Runtime/Landscape/Classes/LandscapeInfo.h |
| Include | #include "LandscapeInfo.h" |
Syntax
class ULandscapeInfo : public UObject
Variables
| Type | Name | Description | |
|---|---|---|---|
| int32 | ComponentNumSubsections | ||
| int32 | ComponentSizeQuads | ||
| FVector | DrawScale | ||
| TWeakObjectPtr< ALandscape > | LandscapeActor | ||
| FGuid | LandscapeGuid | ||
| TArray< FLandscapeInfoLayerSettings > | Layers | ||
| int32 | RegionSizeInComponents | ||
| TMap< FIntPoint, float > | SelectedRegion | ||
| TArray< TWeakObjectPtr< ALandscapeStreamingProxy > > | StreamingProxies | ||
| int32 | SubsectionSizeQuads | ||
| TMap< FIntPoint, FLandscapeAddCollision > | XYtoAddCollisionMap | Lookup map used by the "add component" tool. | |
| TMap< FIntPoint, ULandscapeHeightfieldCollisionComponent * > | XYtoCollisionComponentMap | Map of the offsets (in component space) to the collision components. Should always be valid. | |
| TMap< FIntPoint, ULandscapeComponent * > | XYtoComponentMap | Map of the offsets (in component space) to the component. Valid in editor only. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
ULandscapeInfo
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | ApplySplines
(
bool bOnlySelected, |
||
| bool | |||
| bool | Returns true if new Landscape actors should be spatially loaded in WorldPartition (LandscapeStreamingProxy & LandscapeSplineActor) | ||
| bool | CanDeleteLandscape
(
FText& OutReason |
||
| bool | Will tell if the landscape actor can have some content related to the layer system | ||
| void | Will clear all component dirty data | ||
| void | ClearSelectedRegion
(
bool bIsComponentwise |
||
| void | CreateLayerEditorSettingsFor
(
ULandscapeLayerInfoObject* LayerInfo |
||
| ALandscapeSplineActor * | CreateSplineActor
(
const FVector& Location |
||
| void | DeleteLayer
(
ULandscapeLayerInfoObject* LayerInfo, |
||
| void | ExportHeightmap
(
const FString& Filename, |
||
| void | ExportHeightmap
(
const FString& Filename |
||
| void | ExportLayer
(
ULandscapeLayerInfoObject* LayerInfo, |
||
| void | ExportLayer
(
ULandscapeLayerInfoObject* LayerInfo, |
||
| ULandscapeInfo * | |||
| ULandscapeInfo * | FindOrCreate
(
UWorld* InWorld, |
||
| 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! | |
| void | ForAllLandscapeComponents
(
TFunctionRef< void(ULandscapeComponent*)> Fn |
||
| void | ForAllSplineActors
(
TFunctionRef< void(TScriptInterface< ILandscapeSplineInterface >)> Fn |
||
| void | |||
| void | ForEachLandscapeProxy
(
TFunctionRef< bool(ALandscapeProxy*)> Fn |
Runs the given function on the root landscape actor and all streaming proxies, with the posibility of early exit Most easily used with a lambda as follows: ForEachLandscapeProxy( -> bool { return continueLoop ? true : false; }); | |
| FBox | |||
| void | GetComponentsInRegion
(
int32 X1, |
||
| ALandscapeProxy * | GetCurrentLevelLandscapeProxy
(
bool bRegistered |
Returns landscape which is spawned in the current level that was previously added to this landscape info object | |
| bool | |||
| uint32 | GetGridSize
(
uint32 InGridSizeInComponents |
Returns LandscapeStreamingProxy Cell Size in WorldPartition | |
| FVector | GetLandscapeCenterPos
(
float& LengthZ, |
||
| bool | GetLandscapeExtent
(
int32& MinX, |
||
| bool | GetLandscapeExtent
(
ALandscapeProxy* Proxy, |
||
| bool | GetLandscapeExtent
(
FIntRect& LandscapeExtent |
||
| ALandscapeProxy * | Returns shared landscape or landscape proxy, mostly for transformations | ||
| ALandscapeProxy * | GetLandscapeProxyForLevel
(
ULevel* Level |
Returns the landscape proxy of this landscape info in the given level (if it exists) | |
| bool | GetLandscapeXYComponentBounds
(
FIntRect& OutXYComponentBounds |
||
| FLandscapeEditorLayerSettings & | GetLayerEditorSettings
(
ULandscapeLayerInfoObject* LayerInfo |
||
| ULandscapeLayerInfoObject * | GetLayerInfoByName
(
FName LayerName, |
||
| int32 | GetLayerInfoIndex
(
FName LayerName, |
||
| int32 | GetLayerInfoIndex
(
ULandscapeLayerInfoObject* LayerInfo, |
||
| FBox | |||
| int32 | |||
| TArray< UPackage * > | |||
| bool | GetOverlappedComponents
(
const FTransform& InAreaWorldTransform, |
Retrieve the components currently loaded that overlap with a given "window" area | |
| TSet< ULandscapeComponent * > | |||
| bool | GetSelectedExtent
(
int32& MinX, |
||
| TSet< ULandscapeComponent * > | |||
| TArray< TScriptInterface< ILandscapeSplineInterface > > | |||
| void | GetUsedPaintLayers
(
const FGuid& InLayerGuid, |
||
| bool | HasUnloadedComponentsInRegion
(
int32 X1, |
||
| void | Initialize
(
UWorld* InWorld, |
Called after creating object so that it can initialize its state | |
| bool | IsRegistered
(
const ALandscapeProxy* Proxy |
Returns true if the Proxy is currently registered with this ULandscapeInfo | |
| bool | IsValidPosition
(
int32 X, |
||
| void | |||
| bool | MarkObjectDirty
(
UObject* InObject, |
See UObjectBaseUtility::MarkPackageDirty | |
| bool | ModifyObject
(
UObject* InObject, |
Landscapes are a bit special in that they contain derived data within their source data, which can be updated on-the-fly depending on many external factors (e.g. a procedural edit layer can invalidate some data on load). | |
| ALandscapeProxy * | MoveComponentsToLevel
(
const TArray< ULandscapeComponent* >& InComponents, |
Moves Components to target level. | |
| ALandscapeProxy * | MoveComponentsToProxy
(
const TArray< ULandscapeComponent* >& InComponents, |
Moves Components to target proxy. | |
| void | MoveSpline
(
ULandscapeSplineControlPoint* InControlPoint, |
Moves Splines connected to this control point to target Proxy. | |
| void | MoveSplines
(
ULandscapeSplinesComponent* InSplineComponent, |
Moves all Splines to target Spline owner. | |
| void | MoveSplinesToLevel
(
ULandscapeSplinesComponent* InSplineComponent, |
Moves all Splines to target level. | |
| void | MoveSplinesToProxy
(
ULandscapeSplinesComponent* InSplineComponent, |
Moves all Splines to target Proxy. Creates ULandscapeSplineComponent if needed | |
| void | MoveSplineToLevel
(
ULandscapeSplineControlPoint* InControlPoint, |
Moves Splines connected to this control point to target level. | |
| void | MoveSplineToProxy
(
ULandscapeSplineControlPoint* InControlPoint, |
Moves Splines connected to this control point to target Proxy. | |
| void | OnModifiedPackageSaved
(
UPackage* InPackage |
||
| void | |||
| void | RecreateLandscapeInfo
(
UWorld* InWorld, |
Recreate all LandscapeInfo objects in given world | |
| void | RegisterActor
(
ALandscapeProxy* Proxy, |
Associates passed actor with this info object | |
| void | RegisterActorComponent
(
ULandscapeComponent* Component, |
Associates passed landscape component with this info object | |
| void | Server doesn't have ULandscapeComponent use CollisionComponents instead to get height on landscape | ||
| void | RegisterSplineActor
(
TScriptInterface< ILandscapeSplineInterface > SplineActor |
||
| void | |||
| void | ReplaceLayer
(
ULandscapeLayerInfoObject* FromLayerInfo, |
||
| void | |||
| void | Reset () |
Resets all actors, proxies, components registrations | |
| void | SetForceNonSpatiallyLoadedByDefault
(
bool bInForceNonSpatiallyLoadedByDefault |
||
| bool | |||
| void | UnregisterActor
(
ALandscapeProxy* Proxy |
Deassociates passed actor with this info object | |
| void | UnregisterActorComponent
(
ULandscapeComponent* Component |
Deassociates passed landscape component with this info object | |
| void | |||
| void | UnregisterSplineActor
(
TScriptInterface< ILandscapeSplineInterface > SplineActor |
||
| void | UpdateAddCollision
(
FIntPoint LandscapeKey |
||
| void | Only for use by the "add component" tool. Todo - move into the tool? | ||
| void | UpdateAllComponentMaterialInstances
(
bool bInInvalidateCombinationMaterials |
Will call UpdateAllComponentMaterialInstances on all LandscapeProxies | |
| void | Update per-component layer allow list to include the currently painted layers. | ||
| void | |||
| bool | UpdateLayerInfoMap
(
ALandscapeProxy* Proxy, |
||
| void | UpdateNanite
(
const ITargetPlatform* InTargetPlatform |
||
| void | UpdateRegistrationForSplineActor
(
UWorld* InWorld, |
Updates the spline registrations (with ALL landscape infos) when a spline has changed the landscape it is targeting | |
| void | UpdateSelectedComponents
(
TSet< ULandscapeComponent* >& NewComponents, |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | Handles reading, writing, and reference collecting using FArchive. |
Constants
| Name | Description |
|---|---|
| bForceNonSpatiallyLoadedByDefault |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< TObjectPtr< ALandscapeStreamingProxy > > | Proxies | This property has been deprecated, please use the StreamingProxies property instead |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ForAllLandscapeProxies
(
TFunctionRef< void(ALandscapeProxy*)> Fn |
This function has been deprecated, please use the ForEachLandscapeProxy property instead | |
| bool | Use ULandscapeSubsystem::GetDirtyOnlyInMode() instead | ||
| void | Texture Baking is officially deprecated now and nothing updates it anymore |