EntityDespawnMsg
Carries the entity despawn protocol message.
Nebula · Packages/com.1by3.nebula/Runtime/Protocol/Messages.cspublic struct EntityDespawnMsgCarries the entity despawn protocol message.
Fields
NetId
public ulong NetId;Epoch
public uint Epoch;ViewSeq
public ushort ViewSeq;Gateway -> client: the view this despawn ends (see EntitySpawnMsg.ViewSeq). A client drops a despawn older than the view it currently holds, so a late leave cannot kill a re-entered replica. Workers send 0.
TakesRiders
public bool TakesRiders;Worker -> worker (MsgId.GhostDespawn): the entity is a carrier that left the world together with what rides in it, because the container it was in was emptied (NebulaWorker.EmptyContainer). A worker holding the carrier as a ghost despawns the riders it owns aboard it the same way, instead of putting them down in the box around it (protocol 18, trailing and optional; written only when true; docs/dynamic-worlds.md D5). False everywhere else, which keeps the riders.
CarrierKey
public string CarrierKey;With TakesRiders: the carrier's PersistentEntity.Key, empty when it is not persistent. A ghost does not know its entity's key, and a rider saved aboard it must name the carrier's real record so that it is restored with the carrier.
Methods
Write
public void Write(NetworkWriter w, MsgId id);Read
public static EntityDespawnMsg Read(NetworkReader r);EndSessionMsg
Worker -> gateway: this gateway no longer speaks for the session, because the player connected again through another gateway (NebulaConfig.SingleSessionPerPlayer).
EntityExtentSource
Where an entity's extent comes from: the box, in the entity's own space, that the ghost band measures to each neighbouring container instead of the entity's root position (NetworkIdentity.ExtentSource).