Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessorContext Class Reference

Inherits AzToolsFramework::Prefab::PrefabConversionUtils::EntityIdPathMapperInterface.

Public Types

using ProcessedObjectStoreContainer = AZStd::vector< ProcessedObjectStore >
 
using ProductAssetDependencyContainer = AZStd::unordered_multimap< AZ::Data::AssetId, AssetDependencyInfo >
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (PrefabProcessorContext, AZ::SystemAllocator)
 
 AZ_RTTI (PrefabProcessorContext, "{C7D77E3A-C544-486B-B774-7C82C38FE22F}")
 
 PrefabProcessorContext (const AZ::Uuid &sourceUuid)
 
virtual bool AddPrefab (PrefabDocument &&document)
 
virtual void ListPrefabs (const AZStd::function< void(PrefabDocument &)> &callback)
 
virtual void ListPrefabs (const AZStd::function< void(const PrefabDocument &)> &callback) const
 
virtual bool HasPrefabs () const
 
virtual bool RegisterSpawnableProductAssetDependency (AZStd::string prefabName, AZStd::string dependentPrefabName, EntityAliasSpawnableLoadBehavior loadBehavior)
 
virtual bool RegisterSpawnableProductAssetDependency (AZStd::string prefabName, const AZ::Data::AssetId &dependentAssetId, EntityAliasSpawnableLoadBehavior loadBehavior)
 
virtual bool RegisterSpawnableProductAssetDependency (uint32_t spawnableAssetSubId, uint32_t dependentSpawnableAssetSubId, EntityAliasSpawnableLoadBehavior loadBehavior)
 
virtual bool RegisterProductAssetDependency (const AZ::Data::AssetId &assetId, const AZ::Data::AssetId &dependentAssetId)
 
virtual bool RegisterProductAssetDependency (const AZ::Data::AssetId &assetId, const AZ::Data::AssetId &dependentAssetId, AZ::Data::AssetLoadBehavior loadBehavior)
 
virtual void RegisterSpawnableEntityAlias (EntityAliasStore link)
 
virtual void ResolveSpawnableEntityAliases (AZStd::string_view prefabName, AzFramework::Spawnable &spawnable, const AzToolsFramework::Prefab::Instance &instance)
 
virtual ProcessedObjectStoreContainer & GetProcessedObjects ()
 
virtual const ProcessedObjectStoreContainer & GetProcessedObjects () const
 
virtual ProductAssetDependencyContainer & GetRegisteredProductAssetDependencies ()
 
virtual const ProductAssetDependencyContainer & GetRegisteredProductAssetDependencies () const
 
virtual void SetPlatformTags (AZ::PlatformTagSet tags)
 
virtual const AZ::PlatformTagSet & GetPlatformTags () const
 
virtual const AZ::Uuid & GetSourceUuid () const
 
virtual void ResolveLinks ()
 
virtual bool HasCompletedSuccessfully () const
 
virtual void ErrorEncountered ()
 
AZ::IO::PathView GetHashedPathUsedForEntityIdGeneration (const AZ::EntityId) override
 EntityIdPathMapperInterface overrides.
 
void SetHashedPathUsedForEntityIdGeneration (const AZ::EntityId, AZ::IO::PathView) override
 
void AddPrefabSpawnablePostProcessEventHandler (PrefabSpawnablePostProcessEvent::Handler &handler)
 
void SendSpawnablePostProcessEvent (const AZStd::string &prefabName, AzFramework::Spawnable &spawnable)
 

Protected Types

using PrefabNames = AZStd::unordered_set< AZStd::string >
 
using PrefabContainer = AZStd::vector< PrefabDocument >
 
using SpawnableEntityAliasStore = AZStd::vector< EntityAliasStore >
 

Protected Member Functions

AZ::Data::AssetLoadBehavior ToAssetLoadBehavior (EntityAliasSpawnableLoadBehavior loadBehavior) const
 

Protected Attributes

AZStd::unordered_map< AZ::EntityId, AZ::IO::Path > m_entityIdToHashedPathMap
 
PrefabContainer m_prefabs
 
PrefabContainer m_pendingPrefabAdditions
 
PrefabNames m_prefabNames
 
SpawnableEntityAliasStore m_entityAliases
 
ProcessedObjectStoreContainer m_products
 
ProductAssetDependencyContainer m_registeredProductAssetDependencies
 
PrefabSpawnablePostProcessEvent m_prefabPostProcessEvent
 
AZ::PlatformTagSet m_platformTags
 
AZ::Uuid m_sourceUuid
 
bool m_isIterating { false }
 
bool m_completedSuccessfully { true }
 

Member Function Documentation

◆ GetHashedPathUsedForEntityIdGeneration()

AZ::IO::PathView AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessorContext::GetHashedPathUsedForEntityIdGeneration ( const AZ::EntityId  )
overridevirtual

◆ SetHashedPathUsedForEntityIdGeneration()

void AzToolsFramework::Prefab::PrefabConversionUtils::PrefabProcessorContext::SetHashedPathUsedForEntityIdGeneration ( const AZ::EntityId  ,
AZ::IO::PathView   
)
overridevirtual

Sets the hashed path used for generation of entity id during deserialization for a given entity id. This map is needed when there is a many-to-one relationship between entity ids and hashed paths.

Parameters
AZ::EntityIdThe Entity Id to set a hashed path for
AZ::IO::PathViewThe hashed path to set for the given Entity Id

Implements AzToolsFramework::Prefab::PrefabConversionUtils::EntityIdPathMapperInterface.


The documentation for this class was generated from the following file: