namespace Mirror
{
/// SyncObjects sync state between server and client. E.g. SyncLists.
public interface SyncObject
{
/// True if there are changes since the last flush
bool IsDirty { get; }
/// Discard all the queued changes
// Consider the object fully synchronized with clients
void Flush();
/// Write a full copy of the object
void OnSerializeAll(NetworkWriter writer);
/// Write the changes made to the object since last sync
void OnSerializeDelta(NetworkWriter writer);
/// Reads a full copy of the object
void OnDeserializeAll(NetworkReader reader);
/// Reads the changes made to the object since last sync
void OnDeserializeDelta(NetworkReader reader);
/// Resets the SyncObject so that it can be re-used
void Reset();
}
}