void _EffectorField(string effectorName, ref FullBodyIK.Effector effector) { var fbik = this.target as FullBodyIKBehaviourBase; var editorSettings = fbik.fullBodyIK.editorSettings; if (effector == null) { return; } GUILayout.BeginHorizontal(); GUILayout.Label(effectorName, GUILayout.Width(effectorNameFieldSize)); GUILayout.FlexibleSpace(); if (editorSettings.isShowEffectorTransform) { EditorUtil.GUI.ObjectField(fbik, "", ref effector.transform, true, GUILayout.Height(18.0f)); } else { float labelSpace = 24.0f; EditorGUILayout.LabelField("Pos", GUILayout.Width(labelSpace)); EditorUtil.GUI.ToggleLegacy(fbik, "", ref effector.positionEnabled); EditorUtil.GUI.PushEnabled(effector.positionEnabled); EditorUtil.GUI.HorizonalSlider(fbik, ref effector.positionWeight, 0.0f, 1.0f, GUILayout.ExpandWidth(false), GUILayout.Width(30.0f)); EditorUtil.GUI.PushEnabled(effector.pullContained); EditorGUILayout.LabelField("Pull", GUILayout.Width(labelSpace)); EditorUtil.GUI.HorizonalSlider(fbik, ref effector.pull, 0.0f, 1.0f, GUILayout.ExpandWidth(false), GUILayout.MinWidth(30.0f)); EditorUtil.GUI.PopEnabled(); EditorUtil.GUI.PopEnabled(); EditorUtil.GUI.PushEnabled(effector.rotationContained); EditorGUILayout.LabelField("Rot", GUILayout.Width(labelSpace)); EditorUtil.GUI.ToggleLegacy(fbik, "", ref effector.rotationEnabled); EditorUtil.GUI.PushEnabled(effector.rotationEnabled); EditorUtil.GUI.HorizonalSlider(fbik, ref effector.rotationWeight, 0.0f, 1.0f, GUILayout.ExpandWidth(false), GUILayout.Width(30.0f)); EditorUtil.GUI.PopEnabled(); EditorUtil.GUI.PopEnabled(); } GUILayout.EndHorizontal(); }