private void ConfigurationInspector(FootTarget footTarget) { //if (!target.jointLimitations) // return; footTarget.RetrieveBones(); showConfiguration = EditorGUILayout.Foldout(showConfiguration, "Configuration", true); if (showConfiguration) { EditorGUI.indentLevel++; UpperLegConfigurationInspector(ref footTarget.upperLeg, footTarget.isLeft); LowerLegConfigurationInspector(ref footTarget.lowerLeg, footTarget.isLeft); FootConfigurationInspector(ref footTarget.foot, footTarget.isLeft); ToesConfigurationInspector(ref footTarget.toes, footTarget.isLeft); EditorGUI.indentLevel--; } }
// Do not remove this, this is dynamically called from Target_Editor! public static FootTarget CreateTarget(FootTarget oldTarget) { HumanoidControl humanoid = oldTarget.humanoid; GameObject targetObject = new GameObject(); if (oldTarget.isLeft) { targetObject.name = "Left Foot Target"; } else { targetObject.name = "Right Foot Target"; } Transform targetTransform = targetObject.transform; targetTransform.parent = humanoid.transform; targetTransform.position = oldTarget.transform.position; targetTransform.rotation = oldTarget.transform.rotation; FootTarget footTarget = Constructor(humanoid, oldTarget.isLeft, targetTransform); if (footTarget.isLeft) { humanoid.leftFootTarget = footTarget; } else { humanoid.rightFootTarget = footTarget; } footTarget.RetrieveBones(); footTarget.InitAvatar(); footTarget.MatchTargetsToAvatar(); return(footTarget); }