AActor::ForceNetRelevant
#include "GameFramework/Actor.h"
Access: public
Specifiers: virtual
Description
Forces this actor to be considered net-relevant even if it would otherwise be culled by distance or dormancy rules. Useful for momentarily critical actors that must reach all clients.
Caveats & Gotchas
- • This only works on actors that are set to replicate (`bReplicates = true`). Calling it on a non-replicating actor has no effect.
- • Forcing net relevance overrides distance-based cull checks only for the current frame's relevancy pass — it does not permanently disable culling. If the actor remains dormant, you may also need to `FlushNetDormancy()` so the server actually sends updated state.
Signature
ENGINE_API virtual void ForceNetRelevant() Return Type
void Example
Force relevance when an important event occurs C++
void AMyGameActor::OnImportantEvent()
{
// Ensure all clients receive this actor's state immediately
ForceNetRelevant();
FlushNetDormancy();
// ... update replicated state
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?