public override void OnInspectorGUI()
        {
            serializedObject.Update();

            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(mode);
            if (EditorGUI.EndChangeCheck())
            {
                containsOverrides = mode.enumValueIndex == 1;
                containsFollows   = mode.enumValueIndex == 0;
            }

            using (new EditorGUI.DisabledGroupScope(multiObject)) {
                string str = boneName.stringValue;
                if (str == "")
                {
                    str = "<None>";
                }
                if (multiObject)
                {
                    str = "<Multiple>";
                }

                using (new GUILayout.HorizontalScope()) {
                    EditorGUILayout.PrefixLabel("Bone");
                    if (GUILayout.Button(str, EditorStyles.popup))
                    {
                        BoneSelectorContextMenu(str, ((SkeletonUtilityBone)target).hierarchy.skeletonRenderer.skeleton.Bones, "<None>", TargetBoneSelected);
                    }
                }
            }

            EditorGUILayout.PropertyField(zPosition);
            EditorGUILayout.PropertyField(position);
            EditorGUILayout.PropertyField(rotation);
            EditorGUILayout.PropertyField(scale);

            using (new EditorGUI.DisabledGroupScope(containsFollows)) {
                EditorGUILayout.PropertyField(overrideAlpha);
                EditorGUILayout.PropertyField(parentReference);
            }

            EditorGUILayout.Space();

            using (new GUILayout.HorizontalScope()) {
                EditorGUILayout.Space();
                using (new EditorGUI.DisabledGroupScope(multiObject || !utilityBone.valid || utilityBone.bone == null || utilityBone.bone.Children.Count == 0)) {
                    if (GUILayout.Button(SpineInspectorUtility.TempContent("Add Child Bone", Icons.bone), GUILayout.MinWidth(120), GUILayout.Height(24)))
                    {
                        BoneSelectorContextMenu("", utilityBone.bone.Children, "<Recursively>", SpawnChildBoneSelected);
                    }
                }
                using (new EditorGUI.DisabledGroupScope(multiObject || !utilityBone.valid || utilityBone.bone == null || containsOverrides)) {
                    if (GUILayout.Button(SpineInspectorUtility.TempContent("Add Override", Icons.poseBones), GUILayout.MinWidth(120), GUILayout.Height(24)))
                    {
                        SpawnOverride();
                    }
                }
                EditorGUILayout.Space();
            }
            EditorGUILayout.Space();
            using (new GUILayout.HorizontalScope()) {
                EditorGUILayout.Space();
                using (new EditorGUI.DisabledGroupScope(multiObject || !utilityBone.valid || !canCreateHingeChain)) {
                    if (GUILayout.Button(SpineInspectorUtility.TempContent("Create 3D Hinge Chain", Icons.hingeChain), GUILayout.MinWidth(120), GUILayout.Height(24)))
                    {
                        CreateHingeChain();
                    }
                    if (GUILayout.Button(SpineInspectorUtility.TempContent("Create 2D Hinge Chain", Icons.hingeChain), GUILayout.MinWidth(120), GUILayout.Height(24)))
                    {
                        CreateHingeChain2D();
                    }
                }
                EditorGUILayout.Space();
            }

            using (new EditorGUI.DisabledGroupScope(multiObject || boundingBoxTable.Count == 0)) {
                EditorGUILayout.LabelField(SpineInspectorUtility.TempContent("Bounding Boxes", Icons.boundingBox), EditorStyles.boldLabel);

                foreach (var entry in boundingBoxTable)
                {
                    Slot slot          = entry.Key;
                    var  boundingBoxes = entry.Value;

                    EditorGUI.indentLevel++;
                    EditorGUILayout.LabelField(slot.Data.Name);
                    EditorGUI.indentLevel++;
                    {
                        foreach (var box in boundingBoxes)
                        {
                            using (new GUILayout.HorizontalScope()) {
                                GUILayout.Space(30);
                                string buttonLabel = box.IsWeighted() ? box.Name + " (!)" : box.Name;
                                if (GUILayout.Button(buttonLabel, GUILayout.Width(200)))
                                {
                                    utilityBone.bone.Skeleton.UpdateWorldTransform();
                                    var bbTransform = utilityBone.transform.Find("[BoundingBox]" + box.Name);                                     // Use FindChild in older versions of Unity.
                                    if (bbTransform != null)
                                    {
                                        var originalCollider = bbTransform.GetComponent <PolygonCollider2D>();
                                        if (originalCollider != null)
                                        {
                                            SkeletonUtility.SetColliderPointsLocal(originalCollider, slot, box);
                                        }
                                        else
                                        {
                                            SkeletonUtility.AddBoundingBoxAsComponent(box, slot, bbTransform.gameObject);
                                        }
                                    }
                                    else
                                    {
                                        var newPolygonCollider = SkeletonUtility.AddBoundingBoxGameObject(null, box, slot, utilityBone.transform);
                                        bbTransform = newPolygonCollider.transform;
                                    }
                                    EditorGUIUtility.PingObject(bbTransform);
                                }
                            }
                        }
                    }
                    EditorGUI.indentLevel--;
                    EditorGUI.indentLevel--;
                }
            }

            BoneFollowerInspector.RecommendRigidbodyButton(utilityBone);

            serializedObject.ApplyModifiedProperties();
        }