[LYN-4782] Make sure Entity notifications are being listened to if a level was already opened before Landscape Canvas was launched.

This commit is contained in:
Chris Galvan
2021-06-24 15:14:20 -05:00
parent c873ddac45
commit 612d2b9872
@@ -462,6 +462,13 @@ namespace LandscapeCanvasEditor
CrySystemEventBus::Handler::BusConnect();
AZ::EntitySystemBus::Handler::BusConnect();
// Listen for Entity notifications if a level is already loaded
// Otherwise, we will connect/disconnect from this bus when levels are loaded/closed
if (GetLegacyEditor()->IsLevelLoaded())
{
AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect();
}
// Create our temporary Node Inspector using a Pinned Inspector
m_customNodeInspector = aznew CustomNodeInspectorDockWidget(this);