public override void OnInspectorGUI()
        {
            if (m_ResetLabelMarginStyle == null)
            {
                m_ResetLabelMarginStyle            = MarsEditorGUI.Styles.ResetLabelMarginStyle;
                m_ResetLabelMarginStyle.margin.top = 2;
            }

            serializedObject.Update();

            GUILayout.Space(4);

            using (new GUILayout.HorizontalScope())
            {
                GUILayout.Label(k_CreatePoseButtonLabel, m_ResetLabelMarginStyle, GUILayout.Width(EditorGUIUtility.labelWidth));

                if (GUILayout.Button(MarsUIResources.instance.BodyIconData.BodyPoseIcon.Icon, MarsEditorGUI.Styles.IconButtonStyle, MarsEditorGUI.MarsStyles.BindingButtonGUIOptions))
                {
                    BodyTrackingModule.OpenAvatarEditor(MarsBodySettings.instance.DefaultPreviewBodyAvatar, true);
                }
            }

            using (var check = new EditorGUI.ChangeCheckScope())
            {
                using (new GUILayout.HorizontalScope(GUILayout.ExpandWidth(true)))
                {
                    m_ToleranceAngleDegrees = EditorGUILayout.Slider(m_ToleranceContent,
                                                                     m_ToleranceAngleDegrees, k_MinAngle, k_MaxAngle);
                    GUILayout.Label(k_DegreesLabel, GUILayout.ExpandWidth(false));
                }

                if (m_ToleranceAngleDegrees < k_MinRecommendedAngle || m_ToleranceAngleDegrees > k_MaxRecommendedAngle)
                {
                    EditorGUILayout.HelpBox(k_BodyPoseMatchingAngleOutOfRange, MessageType.Info);
                }

                if (check.changed)
                {
                    var targetDotProductValue = Mathf.Cos(Mathf.Deg2Rad * m_ToleranceAngleDegrees);
                    m_ToleranceProperty.floatValue = targetDotProductValue;

                    serializedObject.ApplyModifiedProperties();
                }
            }

            using (new GUILayout.HorizontalScope())
            {
                GUILayout.Space(k_IndentationOffset);
                using (new GUILayout.VerticalScope())
                {
                    base.OnInspectorGUI();
                }
            }
        }
        public override void OnInspectorGUI()
        {
            HandlePicker();

            serializedObject.Update();

            GUILayout.Space(8);

            using (var changeCheck = new EditorGUI.ChangeCheckScope())
            {
                using (new GUILayout.HorizontalScope()) {
                    GUILayout.Label("Body Rig", MarsEditorGUI.Styles.ResetLabelMarginStyle, GUILayout.Width(EditorGUIUtility.labelWidth));

                    using (new EditorGUI.DisabledGroupScope(m_AnimatorProperty.objectReferenceValue != null))
                    {
                        if (GUILayout.Button(styles.defaultBodyRigButtonContent, MarsEditorGUI.Styles.ResetButtonMarginStyle,
                                             GUILayout.MaxWidth((EditorGUIUtility.currentViewWidth - MarsEditorGUI.MarsStyles.LabelOffsetHalfBindingsButtonWidth) / 2)))
                        {
                            var defaultBodyRig = GameObject.Instantiate(
                                MarsBodySettings.instance.DefaultLandmarksBodyRig, m_MatchBodyPoseAction.transform).GetComponent <Animator>();
                            defaultBodyRig.gameObject.name = k_DefaultBodyRigGameObjectName;

                            Undo.RegisterCreatedObjectUndo(defaultBodyRig, "Create default body rig");

                            m_AnimatorProperty.objectReferenceValue = defaultBodyRig.GetComponent <Animator>();
                        }
                    }

                    GUILayout.Space(4);

                    if (GUILayout.Button(styles.customBodyRigButtonContent, MarsEditorGUI.Styles.ResetButtonMarginStyle,
                                         GUILayout.MaxWidth((EditorGUIUtility.currentViewWidth - MarsEditorGUI.MarsStyles.LabelOffsetHalfBindingsButtonWidth) / 2)))
                    {
                        var controlId = GUIUtility.GetControlID(FocusType.Passive);
                        EditorGUIUtility.ShowObjectPicker <Avatar>(null, false, string.Empty, controlId);
                    }
                }

                GUILayout.Space(2);

                EditorGUILayout.PropertyField(m_AnimatorProperty, styles.animatorContent);

                using (new EditorGUI.DisabledScope(m_AnimatorProperty.objectReferenceValue == null))
                {
                    using (new GUILayout.HorizontalScope())
                    {
                        GUILayout.Space(EditorGUIUtility.labelWidth);

                        if (GUILayout.Button(styles.editBindingsContent, MarsEditorGUI.Styles.IconButtonStyle,
                                             GUILayout.Width(MarsEditorGUI.MarsStyles.EditBindingsButtonWidth), GUILayout.Height(MarsEditorGUI.MarsStyles.EditBindingsButtonHeight)))
                        {
                            var referencedAnimator = (Animator)m_AnimatorProperty.objectReferenceValue;
                            BodyTrackingModule.OpenAvatarEditor(referencedAnimator.avatar,
                                                                false);
                        }

                        using (new GUILayout.VerticalScope())
                        {
                            GUILayout.Space(Styles.editBindingsLabelOffset);
                            GUILayout.Label(Styles.editBindingsLabel);
                        }
                    }
                }

                GUILayout.Space(Styles.editBindingsButtonBottomPadding);

                EditorGUILayout.PropertyField(m_ScaleToMatchHeightProperty, styles.scaleToMatchHeightContent);
                EditorGUILayout.PropertyField(m_ResetOnLossProperty, styles.resetOnLossContent);

                if (changeCheck.changed)
                {
                    serializedObject.ApplyModifiedProperties();
                }
            }

            if (m_AnimatorProperty.objectReferenceValue == null)
            {
                EditorGUILayout.HelpBox(k_NoAnimatorMessage, MessageType.Warning);
            }
        }