[LYN-4718] [Forums]: [Bug] Editor crashes consistently when EmotionFX is open and Play Game is used (#1552)

This commit is contained in:
Benjamin Jillich
2021-06-25 02:41:52 -07:00
committed by GitHub
parent 03138f4936
commit 0ad6346e8b
@@ -63,6 +63,8 @@ namespace EMotionFX
&actorSettings,
"");
// Set the is owned by runtime flag before finalizing the actor, as that uses the flag already.
assetData->m_emfxActor->SetIsOwnedByRuntime(true);
assetData->m_emfxActor->Finalize();
// Clear out the EMFX raw asset data.
@@ -74,8 +76,6 @@ namespace EMotionFX
return false;
}
assetData->m_emfxActor->SetIsOwnedByRuntime(true);
// Note: Render actor depends on the mesh asset, so we need to manually create it after mesh asset has been loaded.
return static_cast<bool>(assetData->m_emfxActor);
}