diff --git a/Gems/EMotionFX/Code/Source/Integration/Assets/ActorAsset.cpp b/Gems/EMotionFX/Code/Source/Integration/Assets/ActorAsset.cpp index 0a1137d7d9..69cccace81 100644 --- a/Gems/EMotionFX/Code/Source/Integration/Assets/ActorAsset.cpp +++ b/Gems/EMotionFX/Code/Source/Integration/Assets/ActorAsset.cpp @@ -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(assetData->m_emfxActor); }