Navigation
API > API/Plugins > API/Plugins/MassRepresentation
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- USubsystem
- UWorldSubsystem
- UMassRepresentationSubsystem
- UMassCrowdRepresentationSubsystem
- UMassLWIRepresentationSubsystem
References
| Module | MassRepresentation |
| Header | /Engine/Plugins/Runtime/MassGameplay/Source/MassRepresentation/Public/MassRepresentationSubsystem.h |
| Include | #include "MassRepresentationSubsystem.h" |
Syntax
UCLASS&40;&41;
class UMassRepresentationSubsystem : public UWorldSubsystem
Remarks
Subsystem responsible for all visual of mass agents, will handle actors spawning and static mesh instances
Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UMassActorSpawnerSubsystem > | ActorSpawnerSubsystem | ||
| TSharedPtr< FMassEntityManager > | EntityManager | ||
| TMap< FMassEntityHandle, int32 > | HandledMassAgents | Keeping track of all the mass agent this subsystem is responsible for spawning actors | |
| float | RetryMovedDistanceSq | The time to wait before retrying a to spawn actor that failed | |
| float | RetryTimeInterval | The distance a failed spawned actor needs to move before we retry | |
| TArray< TSubclassOf< AActor > > | TemplateActors | The array of all the template actors | |
| FRWAccessDetector | TemplateActorsMTAccessDetector | ||
| TObjectPtr< UMassVisualizationComponent > | VisualizationComponent | The component that handles all the static mesh instances | |
| TObjectPtr< AMassVisualizer > | Visualizer | The actor owning the above visualization component | |
| TObjectPtr< UWorldPartitionSubsystem > | WorldPartitionSubsystem |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | CancelSpawning
(
const FMassEntityHandle MassAgent, |
Cancel spawning request that is matching the TemplateActorIndex | |
| bool | CancelSpawningInternal
(
const int16 TemplateActorIndex, |
||
| void | Mark render state of the static mesh instances dirty | ||
| bool | DoesActorMatchTemplate
(
const AActor& Actor, |
Compare if an actor matches the registered template actor | |
| int16 | FindOrAddStaticMeshDesc
(
const FStaticMeshInstanceVisualizationDesc& Desc |
Get the index of the static mesh visual type, will add a new one if does not exist | |
| int16 | FindOrAddTemplateActor
(
const TSubclassOf< AActor >& ActorClass |
Store the template actor uniquely and return an index to it | |
| FMassInstancedStaticMeshInfoArrayView | |||
| AActor * | GetOrSpawnActorFromTemplate
(
const FMassEntityHandle MassAgent, |
Get or spawn an actor from the TemplateActorIndex | |
| TSubclassOf< AActor > | GetTemplateActorClass
(
const int16 TemplateActorIndex |
||
| bool | IsCollisionLoaded
(
const FName TargetGrid, |
||
| void | OnMassAgentComponentEntityAssociated
(
const UMassAgentComponent& AgentComponent |
||
| void | OnMassAgentComponentEntityDetaching
(
const UMassAgentComponent& AgentComponent |
||
| void | OnProcessingPhaseStarted
(
const float DeltaSeconds, |
Needed for batching the update of static mesh transform | |
| void | Release all references to static meshes and template actors Use with caution, all entities using this representation subsystem must be destroy otherwise they will point to invalid resources | ||
| bool | ReleaseTemplateActor
(
const FMassEntityHandle MassAgent, |
Release an actor that is matching the TemplateActorIndex | |
| bool | ReleaseTemplateActorInternal
(
const int16 TemplateActorIndex, |
||
| bool | ReleaseTemplateActorOrCancelSpawning
(
const FMassEntityHandle MassAgent, |
Release an actor or cancel its spawning if it is matching the TemplateActorIndex |
Overridden from USubsystem
| Type | Name | Description | |
|---|---|---|---|
| void | Deinitialize () |
Implement this for deinitialization of instances of the system | |
| void | Initialize
(
FSubsystemCollectionBase& Collection |
USubsystem BEGIN. |