Navigation
API > API/Runtime > API/Runtime/Landscape
| Name | ULandscapeInfo |
| Type | class |
| Header File | /Engine/Source/Runtime/Landscape/Classes/LandscapeInfo.h |
| Include Path | #include "LandscapeInfo.h" |
Syntax
UCLASS (Transient)
class ULandscapeInfo : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → ULandscapeInfo
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULandscapeInfo
(
const FObjectInitializer& ObjectInitializer |
LandscapeInfo.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| bForceNonSpatiallyLoadedByDefault | bool | LandscapeInfo.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bDrawScaleSetByActor | bool | True when the draw scale has been set by the landscape Actor (false if default or set by a streaming proxy) | LandscapeInfo.h | |
| ComponentNumSubsections | int32 | LandscapeInfo.h | ||
| ComponentSizeQuads | int32 | LandscapeInfo.h | ||
| DrawScale | FVector | LandscapeInfo.h | ||
| LandscapeActor | TWeakObjectPtr< ALandscape > | LandscapeInfo.h | ||
| LandscapeGuid | FGuid | LandscapeInfo.h | ||
| Layers | TArray< FLandscapeInfoLayerSettings > | LandscapeInfo.h | ||
| RegionSizeInComponents | int32 | LandscapeInfo.h | ||
| SelectedRegion | TMap< FIntPoint, float > | LandscapeInfo.h | ||
| SubsectionSizeQuads | int32 | LandscapeInfo.h | ||
| XYtoAddCollisionMap | TMap< FIntPoint, FLandscapeAddCollision > | Lookup map used by the "add component" tool. | LandscapeInfo.h | |
| XYtoCollisionComponentMap | TMap< FIntPoint, ULandscapeHeightfieldCollisionComponent * > | Map of the offsets (in component space) to the collision components. Should always be valid. | LandscapeInfo.h | |
| XYtoComponentMap | TMap< FIntPoint, ULandscapeComponent * > | Map of the offsets (in component space) to the component. Valid in editor only. | LandscapeInfo.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActorsToDelete | TSet< TWeakObjectPtr< AActor >, TWeakObjectPtrSetKeyFuncs< TWeakObjectPtr< AActor > > > | LandscapeInfo.h | ||
| bDirtyOnlyInMode | bool | LandscapeInfo.h | ||
| ModifiedPackages | TSet< TWeakObjectPtr< UPackage >, TWeakObjectPtrSetKeyFuncs< TWeakObjectPtr< UPackage > > > | Not properties since these shouldn't be modified through transactions (no undo/redo) | LandscapeInfo.h | |
| SelectedComponents | TSet< ULandscapeComponent * > | LandscapeInfo.h | ||
| SelectedRegionComponents | TSet< ULandscapeComponent * > | LandscapeInfo.h | ||
| SortedStreamingProxies | TArray< TWeakObjectPtr< ALandscapeStreamingProxy > > | LandscapeInfo.h | ||
| SplineActors | TArray< TScriptInterface< ILandscapeSplineInterface > > | SORTED list of all actors implementing the spline interface that are registered with this landscape info. | LandscapeInfo.h | |
| XYComponentBounds | FIntRect | LandscapeInfo.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool ApplySplines
(
bool bOnlySelected, |
LandscapeInfo.h | ||
bool ApplySplines
(
TSet< TObjectPtr< ULandscapeComponent > >* OutModifiedComponents, |
LandscapeInfo.h | ||
bool AreAllComponentsRegistered() |
LandscapeInfo.h | ||
bool AreNewLandscapeActorsSpatiallyLoaded() |
Returns true if new Landscape actors should be spatially loaded in WorldPartition (LandscapeStreamingProxy & LandscapeSplineActor) | LandscapeInfo.h | |
bool CanDeleteLandscape
(
FText& OutReason |
LandscapeInfo.h | ||
bool CanHaveLayersContent() |
Will tell if the landscape actor can have some content related to the layer system | LandscapeInfo.h | |
void ClearDirtyData() |
Will clear all component dirty data | LandscapeInfo.h | |
void ClearSelectedRegion
(
bool bIsComponentwise |
LandscapeInfo.h | ||
ALandscapeSplineActor * CreateSplineActor
(
const FVector& Location |
LandscapeInfo.h | ||
void CreateTargetLayerSettingsFor
(
ULandscapeLayerInfoObject* LayerInfo |
LandscapeInfo.h | ||
void DeleteActorWhenApplyingModifiedStatus
(
AActor* InActor, |
Enqueue an actor to be deleted when deferred dirty status from MarkObjectDirty is finally applied. | LandscapeInfo.h | |
void DeleteLayer
(
ULandscapeLayerInfoObject* LayerInfo, |
LandscapeInfo.h | ||
void DirtyRuntimeVirtualTextureForLandscapeArea
(
int32 X1, |
Helper function to invalidate the runtime virtual texture data associated with the specified landscape region. | LandscapeInfo.h | |
void ExportHeightmap
(
const FString& Filename, |
LandscapeInfo.h | ||
void ExportHeightmap
(
const FString& Filename |
LandscapeInfo.h | ||
void ExportLayer
(
ULandscapeLayerInfoObject* LayerInfo, |
LandscapeInfo.h | ||
void ExportLayer
(
ULandscapeLayerInfoObject* LayerInfo, |
LandscapeInfo.h | ||
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! | LandscapeInfo.h | |
void ForAllLandscapeComponents
(
TFunctionRef< void(ULandscapeComponent*)> Fn |
LandscapeInfo.h | ||
void ForAllSplineActors
(
TFunctionRef< void(TScriptInterface< ILandscapeSplineInterface >)> Fn |
LandscapeInfo.h | ||
void ForceLayersFullUpdate() |
LandscapeInfo.h | ||
void ForEachLandscapeProxy
(
TFunctionRef< bool(ALandscapeProxy*)> Fn |
Runs the given function on the root landscape actor and all streaming proxies, with the possibility of early exit Most easily used with a lambda as follows: ForEachLandscapeProxy( -> bool { return continueLoop ? true : false; }); | LandscapeInfo.h | |
FBox GetCompleteBounds() |
LandscapeInfo.h | ||
FIntRect GetCompleteLandscapeExtent() |
LandscapeInfo.h | ||
void GetComponentsInRegion
(
int32 X1, |
LandscapeInfo.h | ||
ALandscapeProxy * GetCurrentLevelLandscapeProxy
(
bool bRegistered |
Returns landscape which is spawned in the current level that was previously added to this landscape info object | LandscapeInfo.h | |
bool GetDirtyOnlyInMode() |
LandscapeInfo.h | ||
uint32 GetGridSize
(
uint32 InGridSizeInComponents |
Returns LandscapeStreamingProxy Cell Size in WorldPartition | LandscapeInfo.h | |
FVector GetLandscapeCenterPos
(
float& LengthZ, |
LandscapeInfo.h | ||
bool GetLandscapeExtent
(
int32& MinX, |
LandscapeInfo.h | ||
bool GetLandscapeExtent
(
ALandscapeProxy* Proxy, |
LandscapeInfo.h | ||
bool GetLandscapeExtent
(
FIntRect& LandscapeExtent |
LandscapeInfo.h | ||
ALandscapeProxy * GetLandscapeProxy() |
Returns shared landscape or landscape proxy, mostly for transformations | LandscapeInfo.h | |
ALandscapeProxy * GetLandscapeProxyForLevel
(
ULevel* Level |
Returns the landscape proxy of this landscape info in the given level (if it exists) | LandscapeInfo.h | |
bool GetLandscapeXYComponentBounds
(
FIntRect& OutXYComponentBounds |
LandscapeInfo.h | ||
ULandscapeLayerInfoObject * GetLayerInfoByName
(
FName LayerName, |
LandscapeInfo.h | ||
int32 GetLayerInfoIndex
(
FName LayerName, |
LandscapeInfo.h | ||
int32 GetLayerInfoIndex
(
ULandscapeLayerInfoObject* LayerInfo, |
LandscapeInfo.h | ||
FBox GetLoadedBounds() |
LandscapeInfo.h | ||
int32 GetModifiedPackageCount() |
LandscapeInfo.h | ||
| LandscapeInfo.h | |||
bool GetOverlappedComponents
(
const FTransform& InAreaWorldTransform, |
Retrieve the components currently loaded that overlap with a given "window" area | LandscapeInfo.h | |
TSet< ULandscapeComponent * > GetSelectedComponents() |
LandscapeInfo.h | ||
bool GetSelectedExtent
(
int32& MinX, |
LandscapeInfo.h | ||
TSet< ULandscapeComponent * > GetSelectedRegionComponents() |
LandscapeInfo.h | ||
const TArray< TWeakObjectPtr< ALandscapeStreamingProxy > > & GetSortedStreamingProxies() |
Returns a const reference to the sorted registered streaming proxies | LandscapeInfo.h | |
TArray< TScriptInterface< ILandscapeSplineInterface > > GetSplineActors() |
LandscapeInfo.h | ||
const FLandscapeTargetLayerSettings & GetTargetLayerSettings
(
ULandscapeLayerInfoObject* LayerInfo |
LandscapeInfo.h | ||
void GetUsedPaintLayers
(
const FGuid& InLayerGuid, |
LandscapeInfo.h | ||
bool HasUnloadedComponentsInRegion
(
int32 X1, |
LandscapeInfo.h | ||
void Initialize
(
UWorld* InWorld, |
Called after creating object so that it can initialize its state | LandscapeInfo.h | |
bool IsLandscapeEditableWorld() |
False if landscape editing not supported, in PIE world, or in a Commandlet. | LandscapeInfo.h | |
bool IsPackageModified
(
UPackage* InPackage |
LandscapeInfo.h | ||
bool IsRegistered
(
const ALandscapeProxy* Proxy |
Returns true if the Proxy is currently registered with this ULandscapeInfo | LandscapeInfo.h | |
bool IsValidPosition
(
int32 X, |
LandscapeInfo.h | ||
int32 MarkModifiedPackagesAsDirty() |
Goes through the list of modified packages (as in IsPackageModified) and marks them as dirty | LandscapeInfo.h | |
bool MarkObjectDirty
(
UObject* InObject, |
See UObjectBaseUtility::MarkPackageDirty | LandscapeInfo.h | |
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). | LandscapeInfo.h | |
ALandscapeProxy * MoveComponentsToLevel
(
const TArray< ULandscapeComponent* >& InComponents, |
Moves Components to target level. | LandscapeInfo.h | |
ALandscapeProxy * MoveComponentsToProxy
(
const TArray< ULandscapeComponent* >& InComponents, |
Moves Components to target proxy. | LandscapeInfo.h | |
void MoveSpline
(
ULandscapeSplineControlPoint* InControlPoint, |
Moves Splines connected to this control point to target Proxy. | LandscapeInfo.h | |
void MoveSplines
(
ULandscapeSplinesComponent* InSplineComponent, |
Moves all Splines to target Spline owner. | LandscapeInfo.h | |
void MoveSplinesToLevel
(
ULandscapeSplinesComponent* InSplineComponent, |
Moves all Splines to target level. | LandscapeInfo.h | |
void MoveSplinesToProxy
(
ULandscapeSplinesComponent* InSplineComponent, |
Moves all Splines to target Proxy. Creates ULandscapeSplineComponent if needed | LandscapeInfo.h | |
void MoveSplineToLevel
(
ULandscapeSplineControlPoint* InControlPoint, |
Moves Splines connected to this control point to target level. | LandscapeInfo.h | |
void MoveSplineToProxy
(
ULandscapeSplineControlPoint* InControlPoint, |
Moves Splines connected to this control point to target Proxy. | LandscapeInfo.h | |
void OnModifiedPackageSaved
(
UPackage* InPackage |
LandscapeInfo.h | ||
void RecreateCollisionComponents() |
LandscapeInfo.h | ||
void RegisterActor
(
ALandscapeProxy* Proxy, |
Associates passed actor with this info object | LandscapeInfo.h | |
void RegisterActorComponent
(
ULandscapeComponent* Component, |
Associates passed landscape component with this info object | LandscapeInfo.h | |
void RegisterCollisionComponent
(
ULandscapeHeightfieldCollisionComponent* Component |
Server doesn't have ULandscapeComponent use CollisionComponents instead to get height on landscape | LandscapeInfo.h | |
void RegisterSplineActor
(
TScriptInterface< ILandscapeSplineInterface > SplineActor |
LandscapeInfo.h | ||
void RemoveXYOffsets() |
LandscapeInfo.h | ||
void ReplaceLayer
(
ULandscapeLayerInfoObject* FromLayerInfo, |
LandscapeInfo.h | ||
void RequestSplineLayerUpdate() |
LandscapeInfo.h | ||
void Reset() |
Resets all actors, proxies, components registrations | LandscapeInfo.h | |
bool SupportsLandscapeEditing() |
LandscapeInfo.h | ||
void UnregisterActor
(
ALandscapeProxy* Proxy |
Deassociates passed actor with this info object | LandscapeInfo.h | |
void UnregisterActorComponent
(
ULandscapeComponent* Component |
Deassociates passed landscape component with this info object | LandscapeInfo.h | |
void UnregisterCollisionComponent
(
ULandscapeHeightfieldCollisionComponent* Component |
LandscapeInfo.h | ||
void UnregisterSplineActor
(
TScriptInterface< ILandscapeSplineInterface > SplineActor |
LandscapeInfo.h | ||
void UpdateAddCollision
(
FIntPoint LandscapeKey |
LandscapeInfo.h | ||
void UpdateAllAddCollisions() |
Only for use by the "add component" tool. Todo - move into the tool? | LandscapeInfo.h | |
void UpdateAllComponentMaterialInstances
(
bool bInInvalidateCombinationMaterials |
Will call UpdateAllComponentMaterialInstances on all LandscapeProxies | LandscapeInfo.h | |
void UpdateComponentLayerAllowList() |
Update per-component layer allow list to include the currently painted layers. | LandscapeInfo.h | |
void UpdateDebugColorMaterial() |
LandscapeInfo.h | ||
bool UpdateLayerInfoMap
(
ALandscapeProxy* Proxy, |
LandscapeInfo.h | ||
void UpdateNanite
(
const ITargetPlatform* InTargetPlatform |
LandscapeInfo.h | ||
void UpdateSelectedComponents
(
TSet< ULandscapeComponent* >& NewComponents, |
LandscapeInfo.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Serialize
(
FArchive& Ar |
LandscapeInfo.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static ULandscapeInfo * Find
(
UWorld* InWorld, |
LandscapeInfo.h | ||
static ULandscapeInfo * FindOrCreate
(
UWorld* InWorld, |
LandscapeInfo.h | ||
static void RecreateLandscapeInfo
(
UWorld* InWorld, |
Recreate all LandscapeInfo objects in given world | LandscapeInfo.h | |
static int32 RemoveLandscapeInfo
(
UWorld* InWorld, |
LandscapeInfo.h | ||
static void SetForceNonSpatiallyLoadedByDefault
(
bool bInForceNonSpatiallyLoadedByDefault |
LandscapeInfo.h | ||
static void UpdateRegistrationForSplineActor
(
UWorld* InWorld, |
Updates the spline registrations (with ALL landscape infos) when a spline has changed the landscape it is targeting | LandscapeInfo.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| StreamingProxies_DEPRECATED | TArray< TWeakObjectPtr< ALandscapeStreamingProxy > > | LandscapeInfo.h |