Change notification buses to be addressed on EntityContextId, and connect the handlers to the default id. Request interfaces should not need that id as they can retrieve it from the entityId.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
@@ -96,6 +96,10 @@ namespace AzToolsFramework::Prefab
|
||||
else
|
||||
{
|
||||
containerEntityId = AZ::EntityId();
|
||||
|
||||
// Clear the selection
|
||||
AzToolsFramework::SelectEntities({});
|
||||
|
||||
}
|
||||
|
||||
// Focus on the descendants of the container entity
|
||||
|
||||
+10
-3
@@ -17,12 +17,19 @@ namespace AzToolsFramework::Prefab
|
||||
class PrefabFocusNotifications
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
protected:
|
||||
~PrefabFocusNotifications() = default;
|
||||
|
||||
public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// EBusTraits overrides
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById;
|
||||
using BusIdType = AzFramework::EntityContextId;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! Triggered when the editor focus is changed to a different prefab.
|
||||
virtual void OnPrefabFocusChanged() = 0;
|
||||
|
||||
protected:
|
||||
~PrefabFocusNotifications() = default;
|
||||
};
|
||||
|
||||
using PrefabFocusNotificationBus = AZ::EBus<PrefabFocusNotifications>;
|
||||
|
||||
Reference in New Issue
Block a user