NetworkMapCache
The contents of an entity's maps kept as opaque bytes, by a party that relays them without knowing their types: the gateway, so a late joiner is sent the current contents (docs/replicated-collections.md D6).
Nebula · Packages/com.1by3.nebula/Runtime/Protocol/NetworkMapCodec.cspublic sealed class NetworkMapCacheThe contents of an entity's maps kept as opaque bytes, by a party that relays them without knowing their types: the gateway, so a late joiner is sent the current contents (docs/replicated-collections.md D6). Seeded from a full section, updated by delta sections, encoded back into a full section on demand (once per change).
Methods
CountOf
public int CountOf(byte mapIndex);How many entries the map at mapIndex holds; 0 when unknown.
Get
public byte[] Get(byte mapIndex, byte[] key);The value bytes held for a key, or null.
Reset
public void Reset(byte[] section);Forget everything and take section (a full copy, or null for no maps).
Apply
public void Apply(ArraySegment<byte> section);Apply a section, full or delta.
Encode
public byte[] Encode();The contents as a full section; empty when there are no maps.
Fold
public static byte[] Fold(byte[] full, byte[] delta);A full section with a delta section applied to it: for a spawn that is held and will not be sent again.