Changed a function parameter name

This commit is contained in:
srikappa
2021-06-01 17:03:50 -07:00
parent a9d030b454
commit 9fd690f004
3 changed files with 9 additions and 9 deletions
@@ -973,20 +973,20 @@ namespace AzToolsFramework
return AZ::Success();
}
PrefabOperationResult PrefabPublicHandler::DetachPrefab(const AZ::EntityId& entityId)
PrefabOperationResult PrefabPublicHandler::DetachPrefab(const AZ::EntityId& containerEntityId)
{
if (!entityId.IsValid())
if (!containerEntityId.IsValid())
{
return AZ::Failure(AZStd::string("Cannot detach Prefab Instance with invalid container entity."));
}
if (IsLevelInstanceContainerEntity(entityId))
if (IsLevelInstanceContainerEntity(containerEntityId))
{
return AZ::Failure(AZStd::string("Cannot detach level Prefab Instance."));
}
InstanceOptionalReference owningInstance = GetOwnerInstanceByEntityId(entityId);
if (owningInstance->get().GetContainerEntityId() != entityId)
InstanceOptionalReference owningInstance = GetOwnerInstanceByEntityId(containerEntityId);
if (owningInstance->get().GetContainerEntityId() != containerEntityId)
{
return AZ::Failure(AZStd::string("Input entity should be its owning Instance's container entity."));
}
@@ -1014,7 +1014,7 @@ namespace AzToolsFramework
m_instanceToTemplateInterface->GenerateDomForInstance(instanceDomBefore, parentInstance);
AZStd::unordered_map<AZ::EntityId, AZStd::string> oldEntityAliases;
oldEntityAliases.emplace(entityId, instancePtr->GetEntityAlias(entityId)->get());
oldEntityAliases.emplace(containerEntityId, instancePtr->GetEntityAlias(containerEntityId)->get());
auto containerEntityPtr = instancePtr->DetachContainerEntity();
auto& containerEntity = *containerEntityPtr.release();
@@ -64,7 +64,7 @@ namespace AzToolsFramework
PrefabOperationResult DeleteEntitiesAndAllDescendantsInInstance(const EntityIdList& entityIds) override;
PrefabOperationResult DuplicateEntitiesInInstance(const EntityIdList& entityIds) override;
PrefabOperationResult DetachPrefab(const AZ::EntityId& entityId) override;
PrefabOperationResult DetachPrefab(const AZ::EntityId& containerEntityId) override;
private:
PrefabOperationResult DeleteFromInstance(const EntityIdList& entityIds, bool deleteDescendants);
@@ -157,10 +157,10 @@ namespace AzToolsFramework
* instance and the parent, removing links between this instance and it's nested instances, adding entities directly
* owned by this instance under the parent instance.
* Bails if the entity is not a container entity or belongs to the level prefab instance.
* @param entityId The container entity id of the instance to detach.
* @param containerEntityId The container entity id of the instance to detach.
* @return An outcome object; on failure, it comes with an error message detailing the cause of the error.
*/
virtual PrefabOperationResult DetachPrefab(const AZ::EntityId& entityId) = 0;
virtual PrefabOperationResult DetachPrefab(const AZ::EntityId& containerEntityId) = 0;
};
} // namespace Prefab