Open 3D Engine AzFramework 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.
AzFramework::Spawnable Class Referencefinal

Inherits AZ::Data::AssetData.

Classes

struct  EntityAlias
 An entity alias redirects the spawning of an entity to another entity, possibly in another spawnable. More...
 
class  EntityAliasConstVisitor
 
class  EntityAliasVisitor
 

Public Types

enum class  EntityAliasType : uint8_t {
  Original , Disable , Replace , Additional ,
  Merge
}
 
enum  ShareState : int32_t { Read = -1 , NotShared = 0 , ReadWrite = 1 }
 
using EntityList = AZStd::vector< AZStd::unique_ptr< AZ::Entity > >
 
using EntityAliasList = AZStd::vector< EntityAlias >
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (Spawnable, AZ::SystemAllocator)
 
 AZ_RTTI (AzFramework::Spawnable, "{855E3021-D305-4845-B284-20C3F7FDF16B}", AZ::Data::AssetData)
 
 Spawnable (const AZ::Data::AssetId &id, AssetStatus status=AssetStatus::NotLoaded)
 
 Spawnable (const Spawnable &rhs)=delete
 
 Spawnable (Spawnable &&other)=delete
 
Spawnableoperator= (const Spawnable &rhs)=delete
 
Spawnableoperator= (Spawnable &&other)=delete
 
const EntityList & GetEntities () const
 
EntityList & GetEntities ()
 
EntityAliasConstVisitor TryGetAliasesConst () const
 
EntityAliasConstVisitor TryGetAliases () const
 
EntityAliasVisitor TryGetAliases ()
 
bool IsEmpty () const
 
SpawnableMetaDataGetMetaData ()
 
const SpawnableMetaDataGetMetaData () const
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Static Public Attributes

static constexpr const char * DefaultMainSpawnableName = "Root"
 
static constexpr const char * FileExtension = "spawnable"
 
static constexpr const char * DotFileExtension = ".spawnable"
 

Member Enumeration Documentation

◆ EntityAliasType

enum class AzFramework::Spawnable::EntityAliasType : uint8_t
strong
Enumerator
Original 

The original entity is spawned.

Disable 

No entity will be spawned.

Replace 

The entity alias is spawned instead of the original.

Additional 

The original entity is spawned as well as the alias. The alias will get a new entity id.

Merge 

The original entity is spawned and the components of the alias are added. The caller is responsible for maintaining a valid component list.


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