menu_bookDocumentation

NetworkObject: Ownership, Proxy State, and Automatic Culling

calendar_today May 4, 2026 schedule ~2 min read person patrickjr verified 50

NetworkObject Ownership, Proxy State, and Culling

Derived from NetworkObject.cs in the s&box engine source.

Ownership Model

Every networked GameObject has a NetworkObject (internal) that tracks:

Proxy Logic

CODE
IsProxy = true  when:
  - Not spawning (_isNetworkSpawning == false)
  - AND not the owner (IsOwner == false)
  - AND NOT (IsUnowned AND Networking.IsHost)

This means: the host controls all unowned objects — they are NOT proxies for the host.

Control

HasControl(Connection c) returns true if: Only the controlling connection's transform/snapshot data is accepted.

Orphaned Behavior

When the owner disconnects, NetworkOrphaned determines what happens:

ValueBehavior
DestroyGameObject.Destroy() is called
HostHost becomes the new owner
RandomHost picks a random connected client as owner
ClearOwnerOwner is set to Guid.Empty (unowned)

Network Culling

Objects are automatically culled from connections that can't see them:

Owner Change Events

When ownership changes, the engine fires:

Was this helpful?