|
@@ -966,7 +966,11 @@ namespace AtomSampleViewer
|
|
|
|
|
|
s_instance->m_executingScripts.insert(scriptAsset.GetId());
|
|
|
|
|
|
- if (!s_instance->m_scriptContext->Execute(scriptAsset->GetScriptBuffer().data(), scriptFilePath.c_str(), scriptAsset->GetScriptBuffer().size()))
|
|
|
+ bool executeSuccess = false;
|
|
|
+ AZ::ScriptSystemRequestBus::BroadcastResult(
|
|
|
+ executeSuccess, &AZ::ScriptSystemRequestBus::Events::Load, scriptAsset, AZ::k_scriptLoadBinaryOrText,
|
|
|
+ s_instance->m_scriptContext->GetId());
|
|
|
+ if (!executeSuccess)
|
|
|
{
|
|
|
// Push an error operation on the back of the queue instead of reporting it immediately so it doesn't get lost
|
|
|
// in front of a bunch of queued m_scriptOperations.
|