コード例 #1
0
        /*
         * Draws the custom inspector for IKSolverLimb
         * */
        public static void AddInspector(SerializedProperty prop, bool editHierarchy, bool showReferences)
        {
            // Draw the trigonometric IK inspector
            IKSolverTrigonometricInspector.AddInspector(prop, editHierarchy, showReferences);

            EditorGUILayout.Space();

            if (showReferences && editHierarchy)
            {
                EditorGUILayout.PropertyField(prop.FindPropertyRelative("goal"), new GUIContent("Avatar IK Goal", "Avatar IK Goal here is only used by the 'Arm' bend modifier."));
            }

            EditorGUILayout.PropertyField(prop.FindPropertyRelative("maintainRotationWeight"), new GUIContent("Maintain Rotation", "Weight of rotating the last bone back to the rotation it had before solving IK."));

            // Bend normal modifier.
            EditorGUILayout.PropertyField(prop.FindPropertyRelative("bendModifier"), new GUIContent("Bend Modifier", "Bend normal modifier."));
            EditorGUILayout.PropertyField(prop.FindPropertyRelative("bendModifierWeight"), new GUIContent("Bend Modifier Weight", "Weight of the bend modifier."));

            if (prop.FindPropertyRelative("bendModifier").enumValueIndex == 4)
            {
                EditorGUILayout.PropertyField(prop.FindPropertyRelative("bendGoal"), new GUIContent("Bend Goal", "The bend goal Transform (optional, you can also use IKSolverTrigonometric.SetBendGoalPosition(Vector position, float weight)."));
            }

            EditorGUILayout.Space();
        }
コード例 #2
0
        protected override void AddInspector()
        {
            // Draw the inspector for IKSolverTrigonometric
            IKSolverTrigonometricInspector.AddInspector(solver, !Application.isPlaying, true);

            // Warning box
            if (!script.solver.IsValid(false))
            {
                AddWarningBox(script.solver);
            }
        }
コード例 #3
0
        protected override void AddInspector()
        {
            // Draw the inspector for IKSolverTrigonometric
            IKSolverTrigonometricInspector.AddInspector(solver, !Application.isPlaying, true);

            // Warning box
            string message = string.Empty;

            if (!script.solver.IsValid(ref message))
            {
                AddWarningBox(message);
            }
        }
コード例 #4
0
        /*
         * Draws the custom inspector for IKSolverLimb
         * */
        public static void AddInspector(SerializedProperty prop, bool editHierarchy, bool showReferences, SerializedContent[] content)
        {
            // Draw the trigonometric IK inspector
            IKSolverTrigonometricInspector.AddInspector(prop, editHierarchy, showReferences, content);

            EditorGUILayout.Space();

            if (showReferences && editHierarchy)
            {
                AddContent(content[content.Length - 1]);
            }
            AddClampedFloat(content[content.Length - 2]);

            // Bend normal modifier.
            AddContent(content[content.Length - 3]);
            AddClampedFloat(content[content.Length - 4]);

            EditorGUILayout.Space();
        }
コード例 #5
0
 protected override void AddInspector()
 {
     // Draw the inspector for IKSolverTrigonometric
     IKSolverTrigonometricInspector.AddInspector(solver, !Application.isPlaying, true, content);
 }