Nebula
Core

NetworkMapBase

The untyped half of NetworkMap<TKey, TValue>: what NetworkIdentity needs to send and apply a map without knowing its types (docs/replicated-collections.md).

generated from the sources
Abstract class in namespace Nebula · Packages/com.1by3.nebula/Runtime/Core/NetworkMap.cs
public abstract class NetworkMapBase : NetworkVariableBase

The untyped half of NetworkMap<TKey, TValue>: what NetworkIdentity needs to send and apply a map without knowing its types (docs/replicated-collections.md). NetworkVariableBase.Write and NetworkVariableBase.Read are the full contents, which is what persistence stores.

Fields

MaxEncodedBytes

public const int MaxEncodedBytes = 60 * 1024;

The most a map may hold by default, encoded (61,440 bytes of body, D11): it keeps a PersistAttribute map inside one persisted entry and a full copy a sane size for a spawn.

Properties

Capacity

public int Capacity { get; protected set; } = MaxEncodedBytes;

The most this map may hold, encoded: MaxEncodedBytes unless the constructor chose otherwise. A PersistAttribute map larger than 65,535 bytes cannot be saved as one entry.

Count

public abstract int Count { get; }

How many entries the map holds.

EncodedBytes

public abstract int EncodedBytes { get; }

The encoded size of the full contents, in bytes. At most Capacity.

Methods

Write

public override void Write(NetworkWriter writer);

Read

public override void Read(NetworkReader reader);

On this page