diff --git a/Assets/Mirror/Runtime/NetworkIdentity.cs b/Assets/Mirror/Runtime/NetworkIdentity.cs index a09c953a6..cb72fbb06 100644 --- a/Assets/Mirror/Runtime/NetworkIdentity.cs +++ b/Assets/Mirror/Runtime/NetworkIdentity.cs @@ -43,64 +43,64 @@ namespace Mirror /// The flow for serialization updates managed by the NetworkIdentity is: /// /// - /// + /// /// Each NetworkBehaviour has a dirty mask. This mask is available inside OnSerialize as syncVarDirtyBits - /// - /// + /// + /// /// Each SyncVar in a NetworkBehaviour script is assigned a bit in the dirty mask. - /// - /// + /// + /// /// Changing the value of SyncVars causes the bit for that SyncVar to be set in the dirty mask - /// - /// + /// + /// /// Alternatively, calling SetDirtyBit() writes directly to the dirty mask - /// - /// + /// + /// /// NetworkIdentity objects are checked on the server as part of it's update loop - /// - /// + /// + /// /// If any NetworkBehaviours on a NetworkIdentity are dirty, then an UpdateVars packet is created for that object - /// - /// + /// + /// /// The UpdateVars packet is populated by calling OnSerialize on each NetworkBehaviour on the object - /// - /// + /// + /// /// NetworkBehaviours that are NOT dirty write a zero to the packet for their dirty bits - /// - /// + /// + /// /// NetworkBehaviours that are dirty write their dirty mask, then the values for the SyncVars that have changed - /// - /// + /// + /// /// If OnSerialize returns true for a NetworkBehaviour, the dirty mask is reset for that NetworkBehaviour, /// so it will not send again until its value changes. - /// - /// + /// + /// /// The UpdateVars packet is sent to ready clients that are observing the object - /// + /// /// /// /// /// /// On the client: /// - /// + /// /// an UpdateVars packet is received for an object - /// - /// + /// + /// /// The OnDeserialize function is called for each NetworkBehaviour script on the object - /// - /// + /// + /// /// Each NetworkBehaviour script on the object reads a dirty mask. - /// - /// + /// + /// /// If the dirty mask for a NetworkBehaviour is zero, the OnDeserialize functions returns without reading any more - /// - /// + /// + /// /// If the dirty mask is non-zero value, then the OnDeserialize function reads the values for the SyncVars that correspond to the dirty bits that are set - /// - /// + /// + /// /// If there are SyncVar hook functions, those are invoked with the value read from the stream. - /// + /// /// /// [DisallowMultipleComponent] @@ -272,18 +272,18 @@ public NetworkVisibility visibility /// The AssetId trick: /// listheader> /// - /// + /// /// Ideally we would have a serialized 'Guid m_AssetId' but Unity can't /// serialize it because Guid's internal bytes are private - /// - /// + /// + /// /// UNET used 'NetworkHash128' originally, with byte0, ..., byte16 /// which works, but it just unnecessary extra code - /// - /// + /// + /// /// Using just the Guid string would work, but it's 32 chars long and /// would then be sent over the network as 64 instead of 16 bytes - /// + /// /// /// The solution is to serialize the string internally here and then /// use the real 'Guid' type for everything else via .assetId