UnityEngine.Networking.NetworkTransform.SerializeMode3D C# (CSharp) Method

SerializeMode3D() private method

private SerializeMode3D ( NetworkWriter writer ) : void
writer NetworkWriter
return void
        private void SerializeMode3D(NetworkWriter writer)
        {
            if (base.isServer && (this.m_LastClientSyncTime != 0f))
            {
                writer.Write(this.m_TargetSyncPosition);
                SerializeVelocity3D(writer, this.m_TargetSyncVelocity, CompressionSyncMode.None);
                if (this.syncRotationAxis != AxisSyncMode.None)
                {
                    SerializeRotation3D(writer, this.m_TargetSyncRotation3D, this.syncRotationAxis, this.rotationSyncCompression);
                }
            }
            else
            {
                writer.Write(this.m_RigidBody3D.position);
                SerializeVelocity3D(writer, this.m_RigidBody3D.velocity, CompressionSyncMode.None);
                if (this.syncRotationAxis != AxisSyncMode.None)
                {
                    SerializeRotation3D(writer, this.m_RigidBody3D.rotation, this.syncRotationAxis, this.rotationSyncCompression);
                }
            }
            if (this.m_SyncSpin)
            {
                SerializeSpin3D(writer, this.m_RigidBody3D.angularVelocity, this.syncRotationAxis, this.rotationSyncCompression);
            }
            this.m_PrevPosition = this.m_RigidBody3D.position;
            this.m_PrevRotation = base.transform.rotation;
            this.m_PrevVelocity = this.m_RigidBody3D.velocity.sqrMagnitude;
        }