Add API comments.

Signed-off-by: John <jonawals@amazon.com>
This commit is contained in:
John
2021-10-13 18:58:43 +01:00
parent 3c2c52910f
commit 06910a7c82
3 changed files with 11 additions and 3 deletions
@@ -136,7 +136,7 @@ namespace AzToolsFramework
return m_rootEntityId;
}
bool EntityIdUnderCursor::IsChildEntity() const
bool EntityIdUnderCursor::IsPrefabEntity() const
{
return m_entityId != m_rootEntityId;
}
@@ -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; //<! The entity id under the cursor.
@@ -1845,7 +1845,7 @@ namespace AzToolsFramework
if (mouseInteraction.m_mouseEvent == ViewportInteraction::MouseEvent::DoubleClick &&
mouseInteraction.m_mouseInteraction.m_mouseButtons.Left())
{
if (entityIdsUnderCursor.IsChildEntity())
if (entityIdsUnderCursor.IsPrefabEntity())
{
auto prefabFocusInterface = AZ::Interface<Prefab::PrefabFocusInterface>::Get();
if (prefabFocusInterface)