Navigation
API > API/Plugins > API/Plugins/MassRepresentation > API/Plugins/MassRepresentation/UMassRepresentationActorManageme-
Description
Returns whether the given actor is ready to be used as the visual representation of a Mass entity. The default implementation always returns true, preserving the original behavior of switching the representation as soon as UWorld::SpawnActor returns. Game-side subclasses should override this to keep the entity on its non-actor representation (typically StaticMeshInstance) while an asynchronously streamed asset (SkeletalMesh, StaticMesh, ...) is still being loaded by the spawned actor.
Called from UMassRepresentationProcessor::UpdateRepresentation: while this returns false the actor stays disabled and the ISM/SkinnedMesh instance remains visible (via bIsWaitingForActorVisualReadiness). The wait is bounded by the cvar ai.massrepresentation.MaxActorVisualReadinessWaitFrames; after that cap the processor force-enables and logs a warning, so a buggy override doesn't strand entities.
The hook also fires for externally-owned actors (those hydrated by replication or other non-Mass spawners) on the frame Mass first commits CurrentRepresentation to an actor type; once committed those actors don't re-enter the spawn switch on subsequent frames, so post-commit streaming changes are not gated.
Note on dedicated servers: signals like AActor::WasRecentlyRendered will never report true on a server. Implementations should short-circuit to true when IsNetMode(NM_DedicatedServer) is true, otherwise entities will never leave the default representation server-side.
| Name | IsActorReadyForRepresentation |
| Type | function |
| Header File | /Engine/Plugins/Runtime/MassGameplay/Source/MassRepresentation/Public/MassRepresentationActorManagement.h |
| Include Path | #include "MassRepresentationActorManagement.h" |
| Source | /Engine/Plugins/Runtime/MassGameplay/Source/MassRepresentation/Private/MassRepresentationActorManagement.cpp |
virtual bool IsActorReadyForRepresentation
(
const AActor & Actor
) const
true once the actor is ready to represent the entity, false to keep waiting
Parameters
| Name | Remarks |
|---|---|
| Actor | the just-spawned (or pre-existing externally-owned) actor under consideration |