# Serialization::RealtimeArray

RealtimeArray is a special model type that can be used in your own custom models. It is designed to be a sequential list of models that can be modified at runtime.

Modifying the array sends the minimal amount of information necessary for other clients to replicate the change. The whole collection is not sent every time.

Properties

int Count

int Normal.Realtime.Serialization.RealtimeArray< TValue >.Count

The total number of items in the RealtimeSet, including the items that have been added locally and have yet to be confirmed by the server.

TValue this[int index]

TValue Normal.Realtime.Serialization.RealtimeArray< TValue >.this[int index]

Used to retrieve the model at a specific index.

Methods

void Add (TValue value)

void Normal.Realtime.Serialization.RealtimeArray< TValue >.Add

Adds a model to the RealtimeArray. This method will immediately fire a modelAdded event.

uint GetCollectionTypeID ()

uint Normal.Realtime.Serialization.RealtimeArray< TValue >.GetCollectionTypeID

IEnumerator<TValue> GetEnumerator ()

IEnumerator<TValue> Normal.Realtime.Serialization.RealtimeArray< TValue >.GetEnumerator

delegate void ModelAdded (RealtimeArray< TValue > array, TValue model, bool remote)

delegate void Normal.Realtime.Serialization.RealtimeArray< TValue >.ModelAdded

void Read (ReadStream stream, StreamContext context)

void Normal.Realtime.Serialization.RealtimeArray< TValue >.Read

RealtimeArray ()

Normal.Realtime.Serialization.RealtimeArray< TValue >.RealtimeArray

void Write (WriteStream stream, StreamContext context)

void Normal.Realtime.Serialization.RealtimeArray< TValue >.Write

int WriteLength (StreamContext context)

int Normal.Realtime.Serialization.RealtimeArray< TValue >.WriteLength

Events

ModelAdded modelAdded

ModelAdded Normal.Realtime.Serialization.RealtimeArray< TValue >.modelAdded

An event that fires whenever an item is added. This event includes a boolean to signal whether the model was added by the local client or a remote client.