InterestSubscribeMsg
Gateway -> worker: the set of regions this gateway wants entities from.
Nebula · Packages/com.1by3.nebula/Runtime/Protocol/Messages.cspublic struct InterestSubscribeMsgGateway -> worker: the set of regions this gateway wants entities from. The state is a set, so the message is idempotent: a delta applies only when BaseSeq is the worker's current sequence and the resulting (count, hash) matches, and the worker otherwise keeps what it has and asks for a resync. The grid travels with it so a worker can refuse to filter with ids the gateway did not mean.
Fields
Seq
public uint Seq;Sequence this message brings the worker's set to.
BaseSeq
public uint BaseSeq;Sequence the delta is against; ignored for a InterestSubscribeFlags.Full message.
EdgeX, EdgeY, EdgeZ, OffsetX, OffsetY, OffsetZ
public float EdgeX, EdgeY, EdgeZ, OffsetX, OffsetY, OffsetZ;Planar
public bool Planar;Flags
public InterestSubscribeFlags Flags;Add
public List<ulong> Add;Remove
public List<ulong> Remove;FociRegions
public List<ulong> FociRegions;The regions the gateway's clients are focused on, always in full; small, and the worker matches wide entities against them.
Entities
public List<ulong> Entities;Explicit per-entity subscriptions (policy extras), always in full.
SetCount
public uint SetCount;Regions in the set after applying this message.
SetHash
public ulong SetHash;Order-independent mix of the set after applying (see RegionSubscription.Hash).
Properties
IsFull
public bool IsFull { get; }IsCommit
public bool IsCommit { get; }Grid
public InterestGrid Grid { get; set; }The grid the sender made these region ids with.
Methods
Write
public void Write(NetworkWriter w);Read
public static InterestSubscribeMsg Read(NetworkReader r, InterestSubscribeMsg reuse = default);Read a subscription. Pass the previous message back in to reuse its lists: a gateway link sends one of these several times a second and the worker has no reason to allocate four lists each time.