Nebula
Protocol

AuthorityTransferMsg

The authority event.

generated from the sources
public struct AuthorityTransferMsg

The authority event. Carries the sender's exact final state so the receiver snaps to it and never computes a starting state of its own, plus the not-yet-simulated inputs so the input stream continues without a gap.

Fields

Entity

public EntitySpawnMsg Entity;

NewEpoch

public uint NewEpoch;

PendingInputs

public byte[] PendingInputs;

HandoverState

public byte[] HandoverState;

Per-behavior handover-only state (NetworkIdentity.WriteHandoverState).

GhostWorkers

public string[] GhostWorkers;

SessionGeneration

public ulong SessionGeneration;

The owner's session as the sender knew it (PlayerSessions), so the receiver accepts the owner's gateway at once. 0/"" for an unowned entity.

SessionGateway

public string SessionGateway;

InterestGateways

public string[] InterestGateways;

Gateway keys (PlayerSessions.GatewayKey) that were following this entity on the old owner without subscribing its region — an explicit per-entity subscription, or the session it speaks for. The new owner announces the spawn to these gateways as well as to the gateways its own regions cover, so a followed entity is not lost the moment it changes worker.

Crossing

public bool Crossing;

The entity is crossing a physics frame's boundary and the sender is not the frame's pose owner, so it hands the entity over unconverted for the pose owner to cross it at its exact pose (docs/container-tree.md D15). A trailing optional byte: an older reader stops before it.

SessionOrphan

public PlayerSessions.OrphanKind SessionOrphan;

The owner's session was waiting for a reclaim on the sender (PlayerSessions.Session.Orphan): the player disconnected, or the gateway's link to the sender dropped. The receiver keeps it waiting, so a pawn handed over in the reclaim window is still removed if nobody comes back. With SessionReclaimRemaining, a trailing optional section after Crossing, written only for an orphan: an older reader stops before it.

SessionReclaimRemaining

public float SessionReclaimRemaining;

Seconds of the reclaim grace (NebulaConfig.SessionReclaimSeconds) the session had left on the sender. A duration, not a time: the two workers' clocks differ, so the receiver resumes the countdown from its own clock.

CarriesExtent

public bool CarriesExtent;

The entity's extent was set at runtime (NetworkIdentity.ExtentChangedAtRuntime), so the receiver takes ExtentSource, ExtentCenter and ExtentSize instead of its prefab's. A trailing optional section after the session section (docs/entity-extents.md D6), written only when set: an older reader stops before it. False leaves the receiver's copy as it is.

ExtentSource

public EntityExtentSource ExtentSource;

Where the extent comes from. For EntityExtentSource.Colliders the receiver computes the box from its own copy.

ExtentCenter

public Vector3 ExtentCenter;

Centre of the extent box in the entity's local space.

ExtentSize

public Vector3 ExtentSize;

Size of the extent box in the entity's local space.

UpdateInterval

public byte UpdateInterval;

The entity's NetworkIdentity.UpdateInterval (protocol 24), a trailing optional section after the extent section, written when it is above 1. 0 when absent, which the receiver reads as 1. A sender that writes it with no extent to carry writes the extent section as "none" (NoExtent).

Dormancy

public DormancyFlags Dormancy;

The entity's dormancy (protocol 24, docs/server-owned-entities.md §6), after UpdateInterval in the same trailing update section, with SleepWhenUnobserved. Written when either is set; absent reads as awake and never put to sleep.

SleepWhenUnobserved

public float SleepWhenUnobserved;

The entity's NetworkIdentity.SleepWhenUnobserved, in seconds; 0 never.

Methods

Write

public void Write(NetworkWriter w);

Read

public static AuthorityTransferMsg Read(NetworkReader r);

Nested types

DormancyFlags

[Flags]
public enum DormancyFlags : byte

What Dormancy says about the entity being handed over.

Members

NameValueDescription
None0
Dormant1It is asleep (NetworkIdentity.IsDormant): the receiver keeps it asleep.
WakesOnInterest2With Dormant: it wakes when a gateway watches it (NetworkIdentity.WakesOnInterest).

On this page