Changed FocusOnOwningPrefab to return Outcome. Added comments and error checking.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
namespace AzToolsFramework::Prefab
|
||||
{
|
||||
typedef AZ::Outcome<void, AZStd::string> PrefabFocusOperationResult;
|
||||
|
||||
/*!
|
||||
* PrefabFocusInterface
|
||||
*/
|
||||
@@ -24,16 +26,19 @@ namespace AzToolsFramework::Prefab
|
||||
public:
|
||||
AZ_RTTI(PrefabFocusInterface, "{F3CFA37B-5FD8-436A-9C30-60EB54E350E1}");
|
||||
|
||||
// TODO - Add comment
|
||||
virtual void FocusOnOwningPrefab(AZ::EntityId entityId) = 0;
|
||||
//! Set the focused prefab instance to the owning instance of the entityId provided
|
||||
//! @param entityId The entityId of the entity whose owning instance we want the prefab system to focus on.
|
||||
virtual PrefabFocusOperationResult FocusOnOwningPrefab(AZ::EntityId entityId) = 0;
|
||||
|
||||
// TODO - Add comment
|
||||
//! Returns the template id of the instance the prefab system is focusing on.
|
||||
virtual TemplateId GetFocusedPrefabTemplateId() = 0;
|
||||
|
||||
// TODO - Add comment
|
||||
//! Returns a reference to the instance the prefab system is focusing on.
|
||||
virtual InstanceOptionalReference GetFocusedPrefabInstance() = 0;
|
||||
|
||||
// TODO - Add comment
|
||||
//! Returns whether the entity belongs to the instance that is being focused on, or one of its descendants.
|
||||
//! @param entityId The entityId of the queried entity.
|
||||
//! @return true if the entity belongs to the focused instance or one of its descendants, false otherwise.
|
||||
virtual bool IsOwningPrefabBeingFocused(AZ::EntityId entityId) = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user