bool WriteParameters(NetworkWriter writer, bool forceAll = false)
        {
            ulong dirtyBits = forceAll ? (~0ul) : NextDirtyBits();

            writer.WritePackedUInt64(dirtyBits);
            for (int i = 0; i < namesParameters.Length; i++)
            {
                if ((dirtyBits & (1ul << i)) == 0)
                {
                    continue;
                }

                if (i < lastFloatParameters.Length)
                {
                    float newFloatValue = m_Motion.motionGraph.GetFloat(Animator.StringToHash(namesParameters[i]));
                    writer.WriteSingle(newFloatValue);
                }
                else if (i >= lastFloatParameters.Length &&
                         i < (lastFloatParameters.Length + lastIntParameters.Length))
                {
                    int newIntValue = m_Motion.motionGraph.GetInt(Animator.StringToHash(namesParameters[i]));
                    writer.WritePackedInt32(newIntValue);
                }
                else if (i >= (lastFloatParameters.Length + lastIntParameters.Length) &&
                         i < (lastFloatParameters.Length + lastIntParameters.Length + lastSwitchParameters.Length))
                {
                    bool newBoolValue = m_Motion.motionGraph.GetSwitch(Animator.StringToHash(namesParameters[i]));
                    writer.WriteBoolean(newBoolValue);
                }
                else if (i >= (lastFloatParameters.Length + lastIntParameters.Length + lastSwitchParameters.Length) &&
                         i < (lastFloatParameters.Length + lastIntParameters.Length + lastSwitchParameters.Length + lastVectorParameters.Length))
                {
                    Vector3 newVectorValue = m_Motion.motionGraph.GetVector(Animator.StringToHash(namesParameters[i]));
                    writer.WriteVector3(newVectorValue);
                }
                else if (i >= (lastFloatParameters.Length + lastIntParameters.Length + lastSwitchParameters.Length + lastVectorParameters.Length) &&
                         i < (lastFloatParameters.Length + lastIntParameters.Length + lastSwitchParameters.Length + lastVectorParameters.Length + lastTransformParameters.Length))
                {
                    Transform newTransformValue = m_Motion.motionGraph.GetTransform(Animator.StringToHash(namesParameters[i]));
                    writer.WriteTransform(newTransformValue);
                }
            }
            return(dirtyBits != 0);
        }