private void WeightChannelDrawer(
            ref bool isChannelEnabled, ref BoneWeightData boneWeightData,
            bool isChannelEnabledMixed = false, bool isBoneIndexMixed = false, bool isWeightMixed = false)
        {
            EditorGUILayout.BeginHorizontal();

            EditorGUIUtility.fieldWidth = 1f;
            EditorGUIUtility.labelWidth = 1f;

            EditorGUI.showMixedValue = isChannelEnabledMixed;
            isChannelEnabled         = EditorGUILayout.Toggle(GUIContent.none, isChannelEnabled);

            EditorGUIUtility.fieldWidth = 30f;
            EditorGUIUtility.labelWidth = 30f;

            using (new EditorGUI.DisabledScope(!isChannelEnabled && !isChannelEnabledMixed))
            {
                int tempBoneIndex = GUI.enabled ? boneWeightData.boneIndex : -1;

                EditorGUI.BeginChangeCheck();

                EditorGUI.showMixedValue = GUI.enabled && isBoneIndexMixed;
                tempBoneIndex            = EditorGUILayout.Popup(tempBoneIndex, MeshModuleUtility.GetBoneNameList(spriteMeshData));

                if (EditorGUI.EndChangeCheck())
                {
                    boneWeightData.boneIndex = tempBoneIndex;
                }

                EditorGUIUtility.fieldWidth = 45f;

                EditorGUI.showMixedValue = isWeightMixed;
                boneWeightData.weight    = EditorGUILayout.Slider(GUIContent.none, boneWeightData.weight, 0f, 1f);
            }

            EditorGUILayout.EndHorizontal();

            EditorGUI.showMixedValue    = false;
            EditorGUIUtility.labelWidth = -1;
            EditorGUIUtility.fieldWidth = -1;
        }
        public void OnInspectorGUI()
        {
            Debug.Assert(weightEditor != null);

            weightEditor.mode = (WeightEditorMode)EditorGUILayout.EnumPopup(Contents.mode, weightEditor.mode);

            if (weightEditor.mode != WeightEditorMode.Smooth)
            {
                weightEditor.boneIndex = EditorGUILayout.Popup(Contents.selectedBone, weightEditor.boneIndex, MeshModuleUtility.GetBoneNameList(weightEditor.spriteMeshData));
            }

            weightEditor.autoNormalize = EditorGUILayout.Toggle(Contents.autoNormalize, weightEditor.autoNormalize);

            radius = EditorGUILayout.FloatField(Contents.size, radius);
            radius = Mathf.Max(1f, radius);

            EditorGUIUtility.labelWidth = 70f;

            hardness = EditorGUILayout.Slider(Contents.hardness, hardness, 1f, 100f);
            step     = EditorGUILayout.Slider(Contents.step, step, 1f, 100f);

            EditorGUIUtility.labelWidth = 0f;

            if (weightEditor.boneIndex == -1 && weightEditor.mode != WeightEditorMode.Smooth)
            {
                EditorGUILayout.HelpBox(Contents.helpMessage.text, MessageType.Info, true);
            }
        }