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)
|
||||
return;
|
||||
|
||||
if (headTarget.humanoid.animatorEnabled) {
|
||||
headTarget.headAnimator.enabled = EditorGUILayout.ToggleLeft("Procedural Animation", headTarget.headAnimator.enabled, GUILayout.MinWidth(80));
|
||||
SerializedProperty animatorProp = serializedObject.FindProperty(nameof(HeadTarget.headAnimator)+ "." +nameof(HeadTarget.headAnimator.enabled));
|
||||
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) {
|
||||
EditorGUI.indentLevel++;
|
||||
//headTarget.headAnimator.headAnimation = EditorGUILayout.ToggleLeft("Head Animation", headTarget.headAnimator.headAnimation);
|
||||
#if hFACE
|
||||
headTarget.face.behaviour.enabled = EditorGUILayout.ToggleLeft("Eye Behaviour", headTarget.face.behaviour.enabled);
|
||||
#endif
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -105,6 +105,9 @@ namespace Passer.Humanoid {
|
||||
|
||||
private HeadPredictor headPredictor = new HeadPredictor();
|
||||
|
||||
/// <summary>
|
||||
/// Controls the head when no tracking is active
|
||||
/// </summary>
|
||||
public HeadAnimator headAnimator = new HeadAnimator();
|
||||
public override Passer.Sensor animator { get { return headAnimator; } }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user