Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Plugins/Runtime/MassGameplay/Source/MassRepresentation/Public/MassRepresentationSubsystem.h |
Include |
#include "MassRepresentationSubsystem.h" |
Source |
/Engine/Plugins/Runtime/MassGameplay/Source/MassRepresentation/Private/MassRepresentationSubsystem.cpp |
AActor * GetOrSpawnActorFromTemplate
(
const FMassEntityHandle MassAgent,
const FTransform & Transform,
const int16 TemplateActorIndex,
FMassActorSpawnRequestHandle & SpawnRequestHandle,
float Priority,
FMassActorPreSpawnDelegate ActorPreSpawnDelegate,
FMassActorPostSpawnDelegate ActorPostSpawnDelegate
)
Get or spawn an actor from the TemplateActorIndex
The spawned actor from the template actor type if ready
Parameter |
Description |
---|---|
MassAgent |
is the handle to the associated mass agent |
Transform |
where to create this actor |
TemplateActorIndex |
is the index of the type fetched with FindOrAddTemplateActor() |
SpawnRequestHandle |
[IN/OUT] IN: previously requested spawn OUT: newly requested spawn |
Priority |
of this spawn request in comparison with the others, lower value means higher priority (optional) |
ActorPreSpawnDelegate |
is an optional delegate called before the spawning of an actor |
ActorPostSpawnDelegate |
is an optional delegate called once the actor is spawned |