Navigation
API > API/Plugins > API/Plugins/MassRepresentation
Subsystem responsible for all visual of mass agents, will handle actors spawning and static mesh instances
| Name | UMassRepresentationSubsystem |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MassGameplay/Source/MassRepresentation/Public/MassRepresentationSubsystem.h |
| Include Path | #include "MassRepresentationSubsystem.h" |
Syntax
UCLASS (MinimalAPI)
class UMassRepresentationSubsystem : public UMassSubsystemBase
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UWorldSubsystem → UMassSubsystemBase → UMassRepresentationSubsystem
Derived Classes
Structs
| Name | Remarks |
|---|---|
| FTemplateActorData | |
| FTemplateActorEqualsPredicate |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| InstancedStaticMeshInfosDetector | FRWAccessDetector | Used for default return value from GetMutableInstancedStaticMeshInfos | MassRepresentationSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FStaticMeshInstanceVisualizationDescHandle AddVisualDescWithISMComponent
(
const FStaticMeshInstanceVisualizationDesc& Desc, |
Creates a dedicated visual type described by host Desc and ties ISMComponent to it. | MassRepresentationSubsystem.h | |
FStaticMeshInstanceVisualizationDescHandle AddVisualDescWithISMComponents
(
const FStaticMeshInstanceVisualizationDesc& Desc, |
Creates a dedicated visual type described by host Desc and ties given ISMComponents to it. | MassRepresentationSubsystem.h | |
bool CancelSpawning
(
const FMassEntityHandle MassAgent, |
Cancel spawning request that is matching the TemplateActorIndex | MassRepresentationSubsystem.h | |
void DirtyStaticMeshInstances() |
Mark render state of the static mesh instances dirty | MassRepresentationSubsystem.h | |
bool DoesActorMatchTemplate
(
const AActor& Actor, |
Compare if an actor matches the registered template actor | MassRepresentationSubsystem.h | |
FStaticMeshInstanceVisualizationDescHandle FindOrAddStaticMeshDesc
(
const FStaticMeshInstanceVisualizationDesc& Desc |
Get the index of the static mesh visual type, will add a new one if does not exist | MassRepresentationSubsystem.h | |
int16 FindOrAddTemplateActor
(
const TSubclassOf< AActor >& ActorClass |
Store the template actor uniquely and return an index to it | MassRepresentationSubsystem.h | |
UMassActorSpawnerSubsystem * GetActorSpawnerSubsystem() |
MassRepresentationSubsystem.h | ||
const FMassISMCSharedData * GetISMCSharedDataForDescriptionIndex
(
const int32 DescriptionIndex |
Fetches FMassISMCSharedData indicated by DescriptionIndex, or nullptr if it's not a valid index | MassRepresentationSubsystem.h | |
const FMassISMCSharedData * GetISMCSharedDataForInstancedStaticMesh
(
const UInstancedStaticMeshComponent* ISMC |
Fetches FMassISMCSharedData indicated by an ISMC, or nullptr if the ISMC is not represented by any shared data. | MassRepresentationSubsystem.h | |
FMassInstancedStaticMeshInfoArrayView GetMutableInstancedStaticMeshInfos() |
MassRepresentationSubsystem.h | ||
AActor * GetOrSpawnActorFromTemplate
(
const FMassEntityHandle MassAgent, |
Get or spawn an actor from the TemplateActorIndex | MassRepresentationSubsystem.h | |
TSubclassOf< AActor > GetTemplateActorClass
(
const int16 TemplateActorIndex |
MassRepresentationSubsystem.h | ||
bool IsCollisionLoaded
(
const FName TargetGrid, |
MassRepresentationSubsystem.h | ||
void ReleaseAllResources() |
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 | MassRepresentationSubsystem.h | |
void ReleaseTemplate
(
const TSubclassOf< AActor >& ActorClass |
Responds to the FMassEntityTemplate getting destroyed, and releases reference to corresponding Actor in TemplateActors | MassRepresentationSubsystem.h | |
bool ReleaseTemplateActor
(
const FMassEntityHandle MassAgent, |
Release an actor that is matching the TemplateActorIndex | MassRepresentationSubsystem.h | |
bool ReleaseTemplateActorOrCancelSpawning
(
const FMassEntityHandle MassAgent, |
Release an actor or cancel its spawning if it is matching the TemplateActorIndex | MassRepresentationSubsystem.h | |
void RemoveVisualDesc
(
const FStaticMeshInstanceVisualizationDescHandle VisualizationHandle |
Removes all data associated with a given VisualizationIndex. | MassRepresentationSubsystem.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool CancelSpawningInternal
(
const int16 TemplateActorIndex, |
MassRepresentationSubsystem.h | ||
void OnMassAgentComponentEntityAssociated
(
const UMassAgentComponent& AgentComponent |
MassRepresentationSubsystem.h | ||
void OnMassAgentComponentEntityDetaching
(
const UMassAgentComponent& AgentComponent |
MassRepresentationSubsystem.h | ||
void OnProcessingPhaseStarted
(
const float DeltaSeconds, |
Needed for batching the update of static mesh transform | MassRepresentationSubsystem.h | |
bool ReleaseTemplateActorInternal
(
const int16 TemplateActorIndex, |
MassRepresentationSubsystem.h | ||
bool SpawnVisualizer
(
TNotNull< UWorld* > World |
MassRepresentationSubsystem.h |
Overridden from USubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Deinitialize() |
MassRepresentationSubsystem.h | ||
virtual void Initialize
(
FSubsystemCollectionBase& Collection |
USubsystem BEGIN. | MassRepresentationSubsystem.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
MassRepresentationSubsystem.h |