From f1b3bf4c73d8491245c4f444cfc72a24caa3a6ac Mon Sep 17 00:00:00 2001 From: chcurran Date: Thu, 10 Jun 2021 17:43:45 -0700 Subject: [PATCH] Fix for running game mode with brand new graph with prefabs. --- .../Code/Editor/Components/EditorScriptCanvasComponent.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp b/Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp index 8a06848709..e3cc9b7896 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/EditorScriptCanvasComponent.cpp @@ -360,6 +360,8 @@ namespace ScriptCanvasEditor } } + AzToolsFramework::ScopedUndoBatch undo("Update Entity With New SC Graph"); + AzToolsFramework::ToolsApplicationRequests::Bus::Broadcast(&AzToolsFramework::ToolsApplicationRequests::Bus::Events::AddDirtyEntity, GetEntityId()); AzToolsFramework::ToolsApplicationEvents::Bus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_AttributesAndValues); }