diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.cpp index 933a8c9ee4..7cdd87d0ae 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.cpp @@ -136,7 +136,7 @@ namespace AzToolsFramework return m_rootEntityId; } - bool EntityIdUnderCursor::IsChildEntity() const + bool EntityIdUnderCursor::IsPrefabEntity() const { return m_entityId != m_rootEntityId; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.h index 0a108c709a..cd99087852 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.h @@ -36,9 +36,17 @@ namespace AzToolsFramework EntityIdUnderCursor(AZ::EntityId entityId); EntityIdUnderCursor(AZ::EntityId entityId, AZ::EntityId rootEntityId); + //! Returns the entity id under the cursor (if any). + //! @note In the case of no entity id under the cursor, an invalid entity id is returned. AZ::EntityId GetEntityId() const; + + //! Returns the root entity id if the entity id under the cursor is part of a prefab, otherwise returns the entity id. + //! @note In the case of no entity id under the cursor, an invalid entity id is returned. AZ::EntityId GetRootEntityId() const; - bool IsChildEntity() const; + + //! Returns true if the entity id under the cursor is part of a prefab, otherwise false. + //! @note In the case of no entity id under the cursor, true is returned (although consider this behavior undefined). + bool IsPrefabEntity() const; private: AZ::EntityId m_entityId; //::Get(); if (prefabFocusInterface)