Fix issues with model data storage when doing long actions in async (eg. SDF generation)

This commit is contained in:
Wojtek Figat
2025-11-10 15:02:33 +01:00
parent 62424215c1
commit 4805dfbdba
6 changed files with 9 additions and 10 deletions

View File

@@ -262,6 +262,7 @@ bool Model::GenerateSDF(float resolutionScale, int32 lodIndex, bool cacheData, f
LOG(Warning, "Cannot generate SDF for virtual models on a main thread.");
return true;
}
auto chunkLocks = Storage ? Storage->Lock() : FlaxStorage::LockData();
lodIndex = Math::Clamp(lodIndex, HighestResidentLODIndex(), LODs.Count() - 1);
// Generate SDF