Changing lua material functor script loading code to pass the correct sub ID for a compiled script asset

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
Guthrie Adams
2021-11-07 15:04:46 -06:00
parent 791d11c8f9
commit c372761f4e
@@ -137,7 +137,7 @@ namespace AZ
}
else if (!m_luaSourceFile.empty())
{
auto loadOutcome = RPI::AssetUtils::LoadAsset<ScriptAsset>(materialTypeSourceFilePath, m_luaSourceFile);
auto loadOutcome = RPI::AssetUtils::LoadAsset<ScriptAsset>(materialTypeSourceFilePath, m_luaSourceFile, ScriptAsset::CompiledAssetSubId);
if (!loadOutcome)
{
AZ_Error("LuaMaterialFunctorSourceData", false, "Could not load script file '%s'", m_luaSourceFile.c_str());