Navigation
API > API/Plugins > API/Plugins/MassSpawner > API/Plugins/MassSpawner/UMassSpawnerSubsystem > API/Plugins/MassSpawner/UMassSpawnerSubsystem/SpawnEntities
References
| Module | MassSpawner |
| Header | /Engine/Plugins/Runtime/MassGameplay/Source/MassSpawner/Public/MassSpawnerSubsystem.h |
| Include | #include "MassSpawnerSubsystem.h" |
| Source | /Engine/Plugins/Runtime/MassGameplay/Source/MassSpawner/Private/MassSpawnerSubsystem.cpp |
void SpawnEntities
&40;
const FMassEntityTemplate & EntityTemplate,
const uint32 NumberToSpawn,
TArray< FMassEntityHandle > & OutEntities
&41;
Remarks
Spawns entities of the kind described by the given EntityTemplate. The spawned entities are fully initialized meaning the EntityTemplate.InitializationPipeline gets run for all spawned entities. true if spawning was successful, false otherwise. In case of failure see logs for more details.
Parameters
| Name | Description |
|---|---|
| EntityTemplate | template to use for spawning entities |
| NumberToSpawn | number of entities to spawn |
| OutEntities | where the IDs of created entities get added. Note that the contents of OutEntities get overridden by the function. |