UActorComponent::NeedsLoadForServer
#include "Components/ActorComponent.h"
Access: public
Specifiers: virtualoverride
Description
Returns whether this component needs to be loaded on dedicated servers. Mirrors NeedsLoadForClient but for the server context.
Caveats & Gotchas
- • Components with bIsEditorOnly set will return false here just as on the client, preventing them from existing on a dedicated server.
- • Overriding this without calling Super can break the engine's internal filtering of objects not relevant to a server, potentially wasting memory and CPU on the server.
Signature
ENGINE_API virtual bool NeedsLoadForServer() const override Return Type
bool Example
Excluding a visual-only component from the server C++
bool UMyVFXComponent::NeedsLoadForServer() const
{
// This component is purely cosmetic; never needed on a dedicated server
return false;
} See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?