Merge pull request #428 from aws-lumberyard-dev/scripting/fix_lua_clear_cache
Scripting/fix lua clear cache
This commit is contained in:
@@ -699,6 +699,10 @@ Data::AssetHandler::LoadResult ScriptSystemComponent::LoadAssetData(
|
||||
script->m_scriptBuffer.resize(scriptDataLength);
|
||||
stream->Read(scriptDataLength, script->m_scriptBuffer.data());
|
||||
|
||||
// Clear cached references in the event of a successful load. This function has to be queued on
|
||||
// AssetBus where NotifyAssetReloaded is also queued, to ensure its execution before NotifyAssetReloaded
|
||||
Data::AssetBus::QueueFunction(&ScriptSystemComponent::ClearAssetReferences, this, asset.GetId());
|
||||
|
||||
return Data::AssetHandler::LoadResult::LoadComplete;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user