Add automatic heightmap files removal on Editor shutdown for deleted terrains

#1902
This commit is contained in:
Wojtek Figat
2024-08-22 23:29:42 +02:00
parent b8cb1a828a
commit fc66738dca
5 changed files with 104 additions and 0 deletions

View File

@@ -113,6 +113,11 @@ TerrainPatch::~TerrainPatch()
#endif
}
RawDataAsset* TerrainPatch::GetHeightfield() const
{
return _heightfield.Get();
}
void TerrainPatch::RemoveLightmap()
{
for (auto& chunk : Chunks)

View File

@@ -149,6 +149,12 @@ public:
return GetChunk(z * Terrain::ChunksCountEdge + x);
}
/// <summary>
/// Gets the heightfield collision data asset.
/// </summary>
/// <returns>The heightfield data asset.</returns>
API_PROPERTY() RawDataAsset* GetHeightfield() const;
/// <summary>
/// Gets the splatmap assigned to this patch.
/// </summary>