Customer PR. Released unused raw asset data in EmotionFX asset to reclaim memory after asset initialization

This commit is contained in:
Walters
2021-04-19 17:08:15 -07:00
parent 6924621cc1
commit b9c618329a
5 changed files with 11 additions and 1 deletions
@@ -68,6 +68,8 @@ namespace EMotionFX
&actorSettings,
"");
assetData->ReleaseEmotionFXData();
if (!assetData->m_emfxActor)
{
AZ_Error("EMotionFX", false, "Failed to initialize actor asset %s", asset.ToString<AZStd::string>().c_str());
@@ -77,7 +79,6 @@ namespace EMotionFX
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);
}