void Start() { _multi = this.GetComponentInParent <Multi> (); _ik_armLeft = _multi.hashMap.GetTransform(eHashIdx.Bone_Arm_Left).GetComponent <IK2Chain> (); _ik_armRight = _multi.hashMap.GetTransform(eHashIdx.Bone_Arm_Right).GetComponent <IK2Chain> (); }
public override void OnInspectorGUI() { DrawDefaultInspector(); IK2Chain myScript = (IK2Chain)target; EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.Space(); if (GUILayout.Button(myScript.invert ? "Inverted" : "Not Inveted")) { myScript.invert = !myScript.invert; } EditorGUILayout.Space(); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button(myScript.toggleIK ? "IK ON" : "IK OFF")) { //true -> false if (true == myScript.toggleIK) { myScript.ToggleOff(true); } //false -> true else { myScript.ToggleOn(); } } // if (GUILayout.Button("Update Bones")) // myScript.UpdateBones(); EditorGUILayout.EndHorizontal(); }