예제 #1
0
        private void ConfigurationInspector(HipsTarget hipsTarget)
        {
            hipsTarget.RetrieveBones();

            showConfiguration = EditorGUILayout.Foldout(showConfiguration, "Configuration", true);
            if (showConfiguration)
            {
                EditorGUI.indentLevel++;

                ChestConfigurationInspector(ref hipsTarget.chest);
                SpineConfigurationInspector(ref hipsTarget.spine);
                HipsConfigurationInspector(ref hipsTarget.hips);

                EditorGUI.indentLevel--;
            }
        }
예제 #2
0
        // Do not remove this, this is dynamically called from Target_Editor!
        public static HipsTarget CreateTarget(HumanoidTarget oldTarget)
        {
            GameObject      targetObject    = new GameObject("Hips Target");
            Transform       targetTransform = targetObject.transform;
            HumanoidControl humanoid        = oldTarget.humanoid;

            targetTransform.parent   = oldTarget.humanoid.transform;
            targetTransform.position = oldTarget.transform.position;
            targetTransform.rotation = oldTarget.transform.rotation;

            HipsTarget hipsTarget = targetTransform.gameObject.AddComponent <HipsTarget>();

            hipsTarget.humanoid = humanoid;
            humanoid.hipsTarget = hipsTarget;

            hipsTarget.RetrieveBones();
            hipsTarget.InitAvatar();
            hipsTarget.MatchTargetsToAvatar();
            //hipsTarget.NewComponent(oldTarget.humanoid);
            //hipsTarget.InitComponent();

            return(hipsTarget);
        }