Navigation
API > API/Plugins > API/Plugins/MassCrowd > API/Plugins/MassCrowd/UMassCrowdRepresentationActorMan-
- UMassRepresentationActorManagement::GetOrSpawnActor()
- UMassCrowdRepresentationActorManagement::GetOrSpawnActor()
References
| Module | MassCrowd |
| Header | /Engine/Plugins/AI/MassCrowd/Source/MassCrowd/Public/MassCrowdRepresentationActorManagement.h |
| Include | #include "MassCrowdRepresentationActorManagement.h" |
| Source | /Engine/Plugins/AI/MassCrowd/Source/MassCrowd/Private/MassCrowdRepresentationActorManagement.cpp |
virtual AActor * GetOrSpawnActor
(
UMassRepresentationSubsystem & RepresentationSubsystem,
FMassEntityManager & EntitySubsystem,
const FMassEntityHandle MassAgent,
const FTransform & Transform,
const int16 TemplateActorIndex,
FMassActorSpawnRequestHandle & SpawnRequestHandle,
const float Priority
) const
Remarks
Returns an actor of the template type and setup fragments values from it the actor spawned
Parameters
| Name | Description |
|---|---|
| RepresentationSubsystem | to use to get or spawn the actor |
| EntitySubsystem | associated to the mass agent |
| MassAgent | is the handle to the associated mass agent |
| ActorInfo | is the fragment where we are going to store the actor pointer |
| Transform | is the spatial information about where to spawn the actor |
| TemplateActorIndex | is the index of the type fetched with UMassRepresentationSubsystem::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 |