/// <summary>Enforce bounds for fields, when changed in inspector.</summary>
        protected override void OnValidate()
        {
            base.OnValidate();
            m_Lens.OnValidate();

            // Upgrade after a legacy deserialize
            if (m_LegacyHeadingBias != float.MaxValue)
            {
                m_Heading.m_HeadingBias = m_LegacyHeadingBias;
                m_LegacyHeadingBias     = float.MaxValue;
                m_RecenterToTargetHeading.LegacyUpgrade(
                    ref m_Heading.m_HeadingDefinition, ref m_Heading.m_VelocityFilterStrength);
                mUseLegacyRigDefinitions = true;
            }
            m_YAxis.Validate();
            m_XAxis.Validate();
            m_RecenterToTargetHeading.Validate();

            InvalidateRigCache();
        }
예제 #2
0
 /// <summary>Enforce bounds for fields, when changed in inspector.</summary>
 protected override void OnValidate()
 {
     base.OnValidate();
     m_Lens.OnValidate();
 }