Fix HeadTarget ProceduralAnimation switch not persistent
This commit is contained in:
parent
e83b6482c9
commit
165378cb6e
@ -280,17 +280,23 @@ namespace Passer.Humanoid {
|
|||||||
if (headTarget.humanoid == null)
|
if (headTarget.humanoid == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (headTarget.humanoid.animatorEnabled) {
|
SerializedProperty animatorProp = serializedObject.FindProperty(nameof(HeadTarget.headAnimator)+ "." +nameof(HeadTarget.headAnimator.enabled));
|
||||||
headTarget.headAnimator.enabled = EditorGUILayout.ToggleLeft("Procedural Animation", headTarget.headAnimator.enabled, GUILayout.MinWidth(80));
|
if (animatorProp != null && headTarget.humanoid.animatorEnabled) {
|
||||||
|
|
||||||
|
GUIContent text = new GUIContent(
|
||||||
|
"Procedural Animation",
|
||||||
|
"Controls the head when no tracking is active"
|
||||||
|
);
|
||||||
|
animatorProp.boolValue = EditorGUILayout.ToggleLeft("Procedural Animation", animatorProp.boolValue, GUILayout.MinWidth(80));
|
||||||
if (headTarget.headAnimator.enabled) {
|
if (headTarget.headAnimator.enabled) {
|
||||||
EditorGUI.indentLevel++;
|
EditorGUI.indentLevel++;
|
||||||
//headTarget.headAnimator.headAnimation = EditorGUILayout.ToggleLeft("Head Animation", headTarget.headAnimator.headAnimation);
|
|
||||||
#if hFACE
|
#if hFACE
|
||||||
headTarget.face.behaviour.enabled = EditorGUILayout.ToggleLeft("Eye Behaviour", headTarget.face.behaviour.enabled);
|
headTarget.face.behaviour.enabled = EditorGUILayout.ToggleLeft("Eye Behaviour", headTarget.face.behaviour.enabled);
|
||||||
#endif
|
#endif
|
||||||
EditorGUI.indentLevel--;
|
EditorGUI.indentLevel--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -105,6 +105,9 @@ namespace Passer.Humanoid {
|
|||||||
|
|
||||||
private HeadPredictor headPredictor = new HeadPredictor();
|
private HeadPredictor headPredictor = new HeadPredictor();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Controls the head when no tracking is active
|
||||||
|
/// </summary>
|
||||||
public HeadAnimator headAnimator = new HeadAnimator();
|
public HeadAnimator headAnimator = new HeadAnimator();
|
||||||
public override Passer.Sensor animator { get { return headAnimator; } }
|
public override Passer.Sensor animator { get { return headAnimator; } }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user