Fix heightfield not saved when editing splatmap of terrain with physical materials in use

#2262
This commit is contained in:
Wojtek Figat
2024-04-22 23:20:44 +02:00
parent 6eb431d12c
commit 4fbe210730

View File

@@ -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