Fix issue with asset loading to be properly canceled when reimporting file

#1894
This commit is contained in:
Wojtek Figat
2023-11-09 14:52:28 +01:00
parent 22c8ec5342
commit 4ae57e7769
7 changed files with 21 additions and 5 deletions

View File

@@ -48,6 +48,8 @@ protected:
// [ContentLoadTask]
Result run() override
{
if (IsCancelRequested())
return Result::Ok;
PROFILE_CPU();
AssetReference<BinaryAsset> ref = _asset.Get();
@@ -67,8 +69,6 @@ protected:
{
if (IsCancelRequested())
return Result::Ok;
// Load it
#if TRACY_ENABLE
ZoneScoped;
ZoneName(*name, name.Length());