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::SpawnEntitiesOptionalArgs Struct Referencefinal

Public Attributes

EntityPreInsertionCallback m_preInsertionCallback
 
EntitySpawnCallback m_completionCallback
 
AZ::SerializeContext * m_serializeContext { nullptr }
 The Serialize Context used to clone entities with. If this is not provided the global Serialize Contetx will be used.
 
SpawnablePriority m_priority { SpawnablePriority_Default }
 The priority at which this call will be executed.
 
bool m_referencePreviouslySpawnedEntities { true }
 

Member Data Documentation

◆ m_completionCallback

EntitySpawnCallback AzFramework::SpawnEntitiesOptionalArgs::m_completionCallback

Callback that's called when spawning entities has completed. This can be triggered from a different thread than the one that made the function call to spawn. The returned list of entities contains all the newly created entities.

◆ m_preInsertionCallback

EntityPreInsertionCallback AzFramework::SpawnEntitiesOptionalArgs::m_preInsertionCallback

Callback that's called after instances of entities have been created, but before they're spawned into the world. This gives the opportunity to modify the entities if needed such as injecting additional components or modifying components.

◆ m_referencePreviouslySpawnedEntities

bool AzFramework::SpawnEntitiesOptionalArgs::m_referencePreviouslySpawnedEntities { true }

Entity references are resolved by referring to the most recent entity spawned from a template entity in the spawnable. If the entity referred to hasn't been spawned yet, the reference will be resolved to the first one that will be spawned. If this flag is set to "true", the id mappings will persist across SpawnEntites calls, and the entity references will resolve correctly across them.
When "false", the entity id mappings will be reset on this call, so entity references will only work within this call, or potentially with any subsequent SpawnEntities call where the flag is true once again.


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