Navigation
API > API/Runtime > API/Runtime/Landscape > API/Runtime/Landscape/ULandscapeComponent
Description
Installs new or updates existing TextureUserDatas for this component: up to one ULandscapeHeightmapTextureEdgeFixup and up to one UTextureMipDataProviderFactory (either ULandscapeTextureStorageProviderFactory or ULandscapeTextureMipEdgeOverrideFactory).
The edge fixup class ULandscapeHeightmapTextureEdgeFixup is used to store edge snapshots and manage edge blending with neighboring heightmap textures.
ULandscapeTextureStorageProviderFactory is used to stream custom-compressed heightmap texture mip data, and it supports also applying edge blending from the edge fixup class while streaming its mips.
If bUseEdgeFixup is enabled, but bUseCompression is not, the ULandscapeTextureMipEdgeOverrideFactory is used to apply the edge blending on top of the standard built-in texture mip streaming.
This function will ensure an edge fixup class exists if bUseEdgeFixup is true, or it will remove any existing ones otherwise.
[EDITOR ONLY] It will capture a new snapshot for the edge fixup, when bUpdateSnapshotNow is true. Ignored in non-editor builds.
[EDITOR ONLY] It will compress heightmaps to a ULandscapeTextureStorageProviderFactory when bUseCompression is true. Ignored in non-editor builds. NOTE: It will NOT remove an existing one if false applying compression is a one-way street, and should only be used in cooked content.
| Name | InstallOrUpdateTextureUserDatas |
| Type | function |
| Header File | /Engine/Source/Runtime/Landscape/Classes/LandscapeComponent.h |
| Include Path | #include "LandscapeComponent.h" |
| Source | /Engine/Source/Runtime/Landscape/Private/Landscape.cpp |
ULandscapeHeightmapTextureEdgeFixup * InstallOrUpdateTextureUserDatas
(
bool bUseEdgeFixup,
bool bUseCompression,
bool bUpdateSnapshotNow,
int32 HeightmapCompressionMipThreshold
)