Updates to the Spawnable entity aliases based on provided feedback on PR.

Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
This commit is contained in:
AMZN-koppersr
2021-11-01 14:18:04 -07:00
parent 6587e149b7
commit 045a826c68
10 changed files with 30 additions and 32 deletions
@@ -27,7 +27,7 @@ namespace AzToolsFramework::Prefab::PrefabConversionUtils
{
enum class EntityAliasType : uint8_t
{
Disabled, //!< No alias is added.
Disable, //!< No alias is added.
OptionalReplace, //!< At runtime the entity might be replaced. If the alias is disabled the original entity will be spawned.
//!< The original entity will be left in the spawnable and a copy is returned.
Replace, //!< At runtime the entity will be replaced. If the alias is disabled nothing will be spawned not. The original
@@ -114,9 +114,9 @@ namespace AzToolsFramework::Prefab::SpawnableUtils
switch (aliasType)
{
case PCU::EntityAliasType::Disabled:
case PCU::EntityAliasType::Disable:
// No need to do anything as the alias is disabled.
return ResultPair(nullptr, AzFramework::Spawnable::EntityAliasType::Disabled);
return ResultPair(nullptr, AzFramework::Spawnable::EntityAliasType::Disable);
case PCU::EntityAliasType::OptionalReplace:
return ResultPair(CloneEntity(entity, source), AzFramework::Spawnable::EntityAliasType::Replace);
case PCU::EntityAliasType::Replace:
@@ -129,7 +129,7 @@ namespace AzToolsFramework::Prefab::SpawnableUtils
default:
AZ_Assert(
false, "Invalid PrefabProcessorContext::EntityAliasType type (%i) provided.", aznumeric_cast<uint64_t>(aliasType));
return ResultPair(nullptr, AzFramework::Spawnable::EntityAliasType::Disabled);
return ResultPair(nullptr, AzFramework::Spawnable::EntityAliasType::Disable);
}
}
}