SyncAudience
Who receives a behavior's sync state (NetworkBehaviour.SyncAudience).
Nebula · Packages/com.1by3.nebula/Runtime/Core/SyncState.cspublic enum SyncAudience : byteWho receives a behavior's sync state (NetworkBehaviour.SyncAudience). An audience only restricts clients: every worker that holds a ghost of the entity receives every behavior's sync state whatever its audience, because game logic on a neighboring worker (a hit test, an interaction, the next owner after a handover) reads those copies. Owner and Custom therefore mean "the workers, plus these clients". The audience is configuration, not state: declare it on the behavior and do not change it after spawn.
Members
| Name | Value | Description |
|---|---|---|
Everyone | 0 | Every client that has the entity in its interest set. The default, and what Nebula always did. |
Owner | 1 | Only the client that owns the entity (NetworkIdentity.OwnerClientId). No client at all for an unowned entity. |
WorkersOnly | 2 | No client. Workers holding a ghost of the entity still receive it. |
Custom | 3 | The clients the authority chooses with NetworkBehaviour.IsInSyncAudience, evaluated again every NetworkBehaviour.SyncAudienceRefreshTicks ticks and whenever the behavior calls NetworkBehaviour.MarkSyncAudienceDirty. |
StateHistory
The bounded per-entity ring of recorded ticks behind NetworkIdentity.StateAt: pose, velocity, container, epoch and the SyncHistoryAttribute variables, one entry per server tick, indexed by tick % capacity.
SyncAudienceCodec
The client member sets of an entity's SyncAudience.Custom behaviors, as the authority last evaluated them: [count:byte]{[behaviourIndex:byte][n:ushort]{[clientId:ulong]}}, each set sorted ascending.