Navigation
API > API/Plugins > API/Plugins/MassSpawner
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- AActor
- AMassSpawner
References
| Module | MassSpawner |
| Header | /Engine/Plugins/Runtime/MassGameplay/Source/MassSpawner/Public/MassSpawner.h |
| Include | #include "MassSpawner.h" |
Syntax
UCLASS&40;HideCategories&61;&40;Object, Actor, Input, Rendering, LOD, Cooking, Collision, HLOD, Partition&41;&41;
class AMassSpawner : public AActor
Remarks
A spawner you can put on a map and configure it to spawn different things
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< FMassEntitySpawnDataGeneratorResult > | AllGeneratedResults | ||
| TArray< FSpawnedEntities > | AllSpawnedEntities | ||
| uint32: 1 | bAutoSpawnOnBeginPlay | ||
| uint32: 1 | bOverrideSchematics | By default TickSchematics will be appended to the simulation's schematics. | |
| int32 | Count | ||
| TArray< FMassSpawnedEntityType > | EntityTypes | Array of entity types to spawn. These define which entities to spawn. | |
| FMassSpawnerOnDespawningFinishedEvent | OnDespawningFinishedEvent | Called once DoDespawning completes and all mass agents spawned by this spawner have been despawned. | |
| FDelegateHandle | OnPostWorldInitDelegateHandle | ||
| FMassSpawnerOnSpawningFinishedEvent | OnSpawningFinishedEvent | Called once DoSpawning completes and all entities have been spawned. | |
| TArray< TObjectPtr< UMassProcessor > > | PostSpawnProcessors | ||
| FDelegateHandle | SimulationStartedHandle | ||
| TArray< FMassSpawnDataGenerator > | SpawnDataGenerators | Array of entity spawn generators. These define where to spawn entities. | |
| float | SpawningCountScale | Scale of the spawning count | |
| TSharedPtr< FStreamableHandle > | StreamingHandle |
Constructors
| Type | Name | Description | |
|---|---|---|---|
AMassSpawner () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| void | DEBUG_Clear () |
Remove all the entities | |
| void | DEBUG_Spawn () |
||
| bool | DespawnEntity
(
const FMassEntityHandle Entity |
If given entity has been spawned by this MassSpawner instance then it will get destroyed and all the book keeping updated. | |
| void | DoDespawning () |
Despawn all mass agent that was spawned by this spawner | |
| void | DoDespawning
(
TConstArrayView< FMassEntityHandle > EntitiesToIgnore |
Despawn all mass agent that was spawned by this spawner, except EntitiesToIgnore. | |
| void | DoSpawning () |
Starts the spawning of all the agent types of this spawner | |
| int32 | GetCount () |
||
| UMassProcessor * | GetPostSpawnProcessor
(
TSubclassOf< UMassProcessor > ProcessorClass |
||
| int32 | |||
| float | |||
| void | OnPostWorldInit
(
UWorld* World, |
||
| void | OnSpawnDataGenerationFinished
(
TConstArrayView< FMassEntitySpawnDataGeneratorResult > Results, |
||
| void | |||
| void | ScaleSpawningCount
(
float Scale |
Scales the spawning counts | |
| void | SpawnGeneratedEntities
(
TConstArrayView< FMassEntitySpawnDataGeneratorResult > Results |
||
| void | UnloadConfig () |
Overridden from AActor
| Type | Name | Description | |
|---|---|---|---|
| void | BeginPlay () |
Overridable native event for when play begins for this actor. | |
| void | EndPlay
(
const EEndPlayReason::Type EndPlayReason |
Overridable function called whenever this actor is being removed from a level | |
| void | Called after all the components in the Components array are registered, called both in editor and during gameplay. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FSpawnedEntities |