Mirror Networking
Mirror.SyncObject Class Referenceabstract

SyncObjects sync state between server and client. E.g. SyncLists. More...

Inheritance diagram for Mirror.SyncObject:
Mirror.SyncIDictionary< TKey, TValue > Mirror.SyncList< T > Mirror.SyncSet< T > Mirror.SyncVar< T > Mirror.SyncDictionary< TKey, TValue > Mirror.SyncHashSet< T > Mirror.SyncSortedSet< T >

Public Member Functions

abstract void ClearChanges ()
 Discard all the queued changes More...
 
abstract void OnSerializeAll (NetworkWriter writer)
 Write a full copy of the object More...
 
abstract void OnSerializeDelta (NetworkWriter writer)
 Write the changes made to the object since last sync More...
 
abstract void OnDeserializeAll (NetworkReader reader)
 Reads a full copy of the object More...
 
abstract void OnDeserializeDelta (NetworkReader reader)
 Reads the changes made to the object since last sync More...
 
abstract void Reset ()
 Resets the SyncObject so that it can be re-used More...
 

Public Attributes

Action OnDirty
 Used internally to set owner NetworkBehaviour's dirty mask bit when changed. More...
 
Func< bool > IsRecording = () => true
 Used internally to check if we are currently tracking changes. More...
 

Detailed Description

SyncObjects sync state between server and client. E.g. SyncLists.

Definition at line 13 of file SyncObject.cs.

Member Function Documentation

◆ ClearChanges()

abstract void Mirror.SyncObject.ClearChanges ( )
pure virtual

◆ OnDeserializeAll()

abstract void Mirror.SyncObject.OnDeserializeAll ( NetworkReader  reader)
pure virtual

◆ OnDeserializeDelta()

abstract void Mirror.SyncObject.OnDeserializeDelta ( NetworkReader  reader)
pure virtual

Reads the changes made to the object since last sync

Implemented in Mirror.SyncIDictionary< TKey, TValue >, Mirror.SyncList< T >, Mirror.SyncSet< T >, and Mirror.SyncVar< T >.

◆ OnSerializeAll()

abstract void Mirror.SyncObject.OnSerializeAll ( NetworkWriter  writer)
pure virtual

◆ OnSerializeDelta()

abstract void Mirror.SyncObject.OnSerializeDelta ( NetworkWriter  writer)
pure virtual

Write the changes made to the object since last sync

Implemented in Mirror.SyncIDictionary< TKey, TValue >, Mirror.SyncList< T >, Mirror.SyncSet< T >, and Mirror.SyncVar< T >.

◆ Reset()

abstract void Mirror.SyncObject.Reset ( )
pure virtual

Member Data Documentation

◆ IsRecording

Func<bool> Mirror.SyncObject.IsRecording = () => true

Used internally to check if we are currently tracking changes.

Definition at line 26 of file SyncObject.cs.

◆ OnDirty

Action Mirror.SyncObject.OnDirty

Used internally to set owner NetworkBehaviour's dirty mask bit when changed.

Definition at line 16 of file SyncObject.cs.