Fix to DownloadMeshData calling the Finished event before the _meshDatasInProgress was set to false.
This commit is contained in:
@@ -101,13 +101,15 @@ namespace FlaxEngine.Utilities
|
|||||||
|
|
||||||
private void DownloadMeshData()
|
private void DownloadMeshData()
|
||||||
{
|
{
|
||||||
|
var success = false;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!_model)
|
if (!_model)
|
||||||
{
|
{
|
||||||
_meshDatasInProgress = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var lods = _model.LODs;
|
var lods = _model.LODs;
|
||||||
_meshDatas = new MeshData[lods.Length][];
|
_meshDatas = new MeshData[lods.Length][];
|
||||||
|
|
||||||
@@ -127,8 +129,7 @@ namespace FlaxEngine.Utilities
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
success = true;
|
||||||
Finished?.Invoke();
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -139,6 +140,11 @@ namespace FlaxEngine.Utilities
|
|||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
_meshDatasInProgress = false;
|
_meshDatasInProgress = false;
|
||||||
|
|
||||||
|
if (success)
|
||||||
|
{
|
||||||
|
Finished?.Invoke();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user