public override void OnInspectorGUI()
        {
            MoveenSkelLimb1 skel       = (MoveenSkelLimb1)this.skel;
            GUIStyle        labelStyle = new GUIStyle {
                fontStyle = FontStyle.Bold,
                fontSize  = 20,
                margin    = new RectOffset(10, 10, 10, 10)
            };

            EditorGUILayout.LabelField("");
            EditorGUILayout.LabelField("Structure", labelStyle);
            EditorGUILayout.LabelField("");

            bool oldValue = solveIk;

            solveIk = GUILayout.Toggle(solveIk, "regression solver help (editor only)");
            if (oldValue != solveIk)
            {
                initWanteds(skel);
            }

            EditorGUILayout.LabelField("");
            EditorGUI.BeginChangeCheck();
            Undo.RecordObject(skel, "limb1editing");

            skel.r1 = EditorGUILayout.FloatField("Bone 1 length", skel.r1);
            skel.r2 = EditorGUILayout.FloatField("Bone 2 length", skel.r2);
            skel.footPlatformHeight = EditorGUILayout.FloatField("Foot platform height", skel.footPlatformHeight);

            EditorGUILayout.LabelField("");
            EditorGUILayout.LabelField("Geometry connection", labelStyle);
            EditorGUILayout.LabelField("");

            skel.bonesGeometry[0] = (Transform)EditorGUILayout.ObjectField("Bone 1 geometry", skel.bonesGeometry[0], typeof(Transform), true);
            skel.bonesGeometry[1] = (Transform)EditorGUILayout.ObjectField("Bone 2 geometry", skel.bonesGeometry[1], typeof(Transform), true);
            skel.bonesGeometry[2] = (Transform)EditorGUILayout.ObjectField("Foot geometry", skel.bonesGeometry[2], typeof(Transform), true);

            EditorGUILayout.LabelField("");
            MoveenSkelLimb2Editor.addBonesButton(skel);
            showDefaultInspector = EditorGUILayout.Foldout(showDefaultInspector, "raw inspector", true);
            if (showDefaultInspector)
            {
                DrawDefaultInspector();
            }

            if (EditorGUI.EndChangeCheck())
            {
                //why do we need both of these?
                EditorUtility.SetDirty(skel);
                skel.needsUpdate = true;

                if (solveIk)
                {
                    skel.reset();
                    initWanteds(skel);
                }
            }
        }
        private static void Gizmo(MoveenSkelLimb1 h, GizmoType gizmoType)
        {
            if (!h.isActiveAndEnabled)
            {
                return;
            }
            OnDrawGizmos(h);
            Gizmos.color = new Color(0, 1, 0, 0.4f);
            MoveenSkelLimb2Editor.drawSimpleSpiderGizmo(h.rotJoint, h.maxLen * 0.2f, h.transform.position, h.targetPosRel);

            if (((int)gizmoType & (int)GizmoType.InSelectionHierarchy) != 0 && solveIk)
            {
                Gizmos.color = IK_GIZMO_COLOR;
                Vector3 w2s = Camera.current.WorldToScreenPoint(h.targetPos);
                if (w2s.z > 0)
                {
                    UnityEditorUtils.fillStripe2D(w2s.getXy(), IK_DISK_R1, IK_DISK_R2, 20);
                }
                drawIkHelp(h.transform, h);
            }
        }