UKismetSystemLibrary::IsServer
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns whether the world this object belongs to is running as the host — true on a listen server, dedicated server, or standalone game.
Caveats & Gotchas
- • Returns true in standalone (non-networked) games as well as on real servers, since standalone is authoritative over itself — use AActor::HasAuthority for authority checks on a specific actor instead.
- • In the editor with Play-In-Editor multiplayer, each PIE instance resolves this independently based on its own world's net mode.
Signature
static bool IsServer(const UObject* WorldContextObject) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| WorldContextObject | const UObject* | Object used to resolve the current world. | — |
Return Type
bool Example
Gate server-only setup logic C++
if (UKismetSystemLibrary::IsServer(this))
{
SpawnServerOnlyActors();
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?