Class SyncObject
SyncObjects sync state between server and client. E.g. SyncLists.
Namespace: Mirror
Assembly: doc.dll
Syntax
public abstract class SyncObject : object
Fields
| Improve this Doc View SourceIsRecording
Used internally to check if we are currently tracking changes.
Declaration
public Func<bool> IsRecording
Field Value
Type | Description |
---|---|
Func<Boolean> |
OnDirty
Used internally to set owner NetworkBehaviour's dirty mask bit when changed.
Declaration
public Action OnDirty
Field Value
Type | Description |
---|---|
Action |
Methods
| Improve this Doc View SourceClearChanges()
Discard all the queued changes
Declaration
public abstract void ClearChanges()
OnDeserializeAll(NetworkReader)
Reads a full copy of the object
Declaration
public abstract void OnDeserializeAll(NetworkReader reader)
Parameters
Type | Name | Description |
---|---|---|
NetworkReader | reader |
OnDeserializeDelta(NetworkReader)
Reads the changes made to the object since last sync
Declaration
public abstract void OnDeserializeDelta(NetworkReader reader)
Parameters
Type | Name | Description |
---|---|---|
NetworkReader | reader |
OnSerializeAll(NetworkWriter)
Write a full copy of the object
Declaration
public abstract void OnSerializeAll(NetworkWriter writer)
Parameters
Type | Name | Description |
---|---|---|
NetworkWriter | writer |
OnSerializeDelta(NetworkWriter)
Write the changes made to the object since last sync
Declaration
public abstract void OnSerializeDelta(NetworkWriter writer)
Parameters
Type | Name | Description |
---|---|---|
NetworkWriter | writer |
Reset()
Resets the SyncObject so that it can be re-used
Declaration
public abstract void Reset()