Navigation
API > API/Plugins > API/Plugins/MassActors
A subsystem managing spawning of actors for all mass subsystems
| Name | UMassActorSpawnerSubsystem |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MassGameplay/Source/MassActors/Public/MassActorSpawnerSubsystem.h |
| Include Path | #include "MassActorSpawnerSubsystem.h" |
Syntax
UCLASS (MinimalAPI, Transient)
class UMassActorSpawnerSubsystem : public UMassSubsystemBase
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UWorldSubsystem → UMassSubsystemBase → UMassActorSpawnerSubsystem
Derived Classes
- UClientInstancedActorsSpawnerSubsystem
- UMassCrowdSpawnerSubsystem
- UServerInstancedActorsSpawnerSubsystem
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DestroyActor
(
AActor* Actor, |
Destroy an actor | MassActorSpawnerSubsystem.h | |
void DisableActorPooling() |
MassActorSpawnerSubsystem.h | ||
void EnableActorPooling() |
MassActorSpawnerSubsystem.h | ||
T & GetMutableSpawnRequest
(
const FMassActorSpawnRequestHandle SpawnRequestHandle |
Returns the stored spawn request from the handle, useful to update the transform | MassActorSpawnerSubsystem.h | |
const T & GetSpawnRequest
(
const FMassActorSpawnRequestHandle SpawnRequestHandle |
Returns the stored spawn request from the handle, useful to update the transform | MassActorSpawnerSubsystem.h | |
bool IsActorPoolingEnabled() |
MassActorSpawnerSubsystem.h | ||
bool IsHandleReleased
(
const FMassActorSpawnRequestHandle SpawnRequestHandle |
Checks whether the given handle has already been released. | MassActorSpawnerSubsystem.h | |
bool IsSpawnRequestHandleValid
(
const FMassActorSpawnRequestHandle SpawnRequestHandle |
MassActorSpawnerSubsystem.h | ||
ESpawnRequestStatus ProcessSpawnRequest
(
const FMassActorSpawnRequestHandle SpawnRequestHandle |
Process a valid spawn request indicated by given handle. | MassActorSpawnerSubsystem.h | |
ESpawnRequestStatus ProcessSpawnRequest
(
const FMassActorSpawnRequestHandle SpawnRequestHandle, |
Similar to the other ProcessSpawnRequest flavor, but with SpawnRequestView and SpawnRequest already provided. | MassActorSpawnerSubsystem.h | |
void ReleaseAllResources() |
MassActorSpawnerSubsystem.h | ||
bool RemoveActorSpawnRequest
(
FMassActorSpawnRequestHandle& SpawnRequestHandle |
Removes a spawn request The only time a spawn request cannot be removed is when its state is processing Also spawn requests are auto removed if you provided a spawn delegate after it was being executed. | MassActorSpawnerSubsystem.h | |
FMassActorSpawnRequestHandle RequestActorSpawn
(
const T& InSpawnRequest |
Request an actor to spawn Note: If you do not provide a spawn delegate, the requester is responsible to remove the request by hand. | MassActorSpawnerSubsystem.h | |
void RetryActorSpawnRequest
(
const FMassActorSpawnRequestHandle SpawnRequestHandle |
Retries a failed spawn request | MassActorSpawnerSubsystem.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TObjectPtr< AActor > FindActorByName
(
const FName ActorName, |
MassActorSpawnerSubsystem.h | ||
virtual FMassActorSpawnRequestHandle GetNextRequestToSpawn
(
int32& InOutHandleIndex |
Retrieve what would be the next best spawning request to spawn, can be overridden to have different logic Default implementation is the first valid request in the list, no interesting logic yet | MassActorSpawnerSubsystem.h | |
void OnPrePhysicsPhaseFinished
(
const float DeltaSeconds |
Called at the end of the PrePhysics mass processing phase and calls ProcessPendingDestruction | MassActorSpawnerSubsystem.h | |
void OnPrePhysicsPhaseStarted
(
const float DeltaSeconds |
Called at the start of the PrePhysics mass processing phase and calls ProcessPendingSpawningRequest | MassActorSpawnerSubsystem.h | |
void ProcessPendingDestruction
(
const double MaxTimeSlicePerTick |
Go through the queued actors to destroy and destroy them until we reach the budget | MassActorSpawnerSubsystem.h | |
void ProcessPendingSpawningRequest
(
const double MaxTimeSlicePerTick |
Go through the spawning request and spawn them until we reach the budget | MassActorSpawnerSubsystem.h | |
virtual bool ReleaseActorToPool
(
AActor* Actor |
Try releasing this actor to pool if possible | MassActorSpawnerSubsystem.h | |
FMassActorSpawnRequestHandle RequestActorSpawnInternal
(
const FConstStructView SpawnRequest |
Internal generic request actor spawn to make sure the request derives from FMassActorSpawnRequest | MassActorSpawnerSubsystem.h | |
virtual ESpawnRequestStatus SpawnActor
(
FConstStructView SpawnRequestView, |
Actual code that will spawn the actor, overridable by subclass if need to be. | MassActorSpawnerSubsystem.h | |
virtual ESpawnRequestStatus SpawnOrRetrieveFromPool
(
FConstStructView SpawnRequestView, |
MassActorSpawnerSubsystem.h |
Overridden from USubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Deinitialize() |
MassActorSpawnerSubsystem.h | ||
virtual void Initialize
(
FSubsystemCollectionBase& Collection |
USubsystem BEGIN. | MassActorSpawnerSubsystem.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
MassActorSpawnerSubsystem.h | ||
static void ConditionalDestroyActor
(
UWorld& World, |
Provides consistent way of conditional destroying Actor within World. | MassActorSpawnerSubsystem.h |