[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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user