diff --git a/Source/Engine/Terrain/TerrainPatch.cpp b/Source/Engine/Terrain/TerrainPatch.cpp index d2c4eaa94..b20b5e9a1 100644 --- a/Source/Engine/Terrain/TerrainPatch.cpp +++ b/Source/Engine/Terrain/TerrainPatch.cpp @@ -1808,6 +1808,9 @@ bool TerrainPatch::UpdateHeightData(TerrainDataUpdateInfo& info, const Int2& mod } #endif + // Mark as modified (need to save texture data during scene saving) + _wasHeightModified = true; + if (!wasHeightChanged) return false; @@ -1820,9 +1823,6 @@ bool TerrainPatch::UpdateHeightData(TerrainDataUpdateInfo& info, const Int2& mod #endif _collisionVertices.Resize(0); - // Mark as modified (need to save texture data during scene saving) - _wasHeightModified = true; - // Note: if terrain is using virtual storage then it won't be updated, we could synchronize that data... // TODO: disable heightmap dynamic streaming - data on a GPU was modified and we don't want to override it with the old data stored in the asset container