// Function to get all the VHP components. private void GetVHPComponents() { if (gameObject.GetComponent <VHPEmotions>()) { m_VHPEmotions = gameObject.GetComponent <VHPEmotions>(); } if (gameObject.GetComponent <VHPGaze>()) { m_VHPGaze = gameObject.GetComponent <VHPGaze>(); } if (gameObject.GetComponent <VHPLipSync>()) { m_VHPLipSync = gameObject.GetComponent <VHPLipSync>(); } }
public override void OnInspectorGUI() { myVHTGaze = (VHPGaze)target; serializedObject.Update(); base.OnInspectorGUI(); if (myVHTGaze.gazeBehavior == VHPGaze.GazeBehavior.PROBABILISTIC) { // Displaying an object field to add the interest field prefab if the gaze behavior of the character is set to probabilistic. string interestFieldPrefabTooltip = "Add the Gaze Interest Field Prefab(Assets/Virtual Human Toolkit/Prefabs/)."; EditorGUILayout.PropertyField(m_interestFieldPrefab, new GUIContent("Interest Field Prefab", interestFieldPrefabTooltip)); //myVHTGaze.interestFieldPrefab = (GameObject)EditorGUILayout.ObjectField(new GUIContent("Interest Field Prefab", interestFieldPrefabTooltip), myVHTGaze.interestFieldPrefab, typeof(GameObject), false) string agentModeTooltip = "Enable the agent mode to override upper body rotations when looking at a target (IK pass must be enabled in the animator settings)."; EditorGUILayout.PropertyField(m_agentMode, new GUIContent("Agent Mode", agentModeTooltip)); } serializedObject.ApplyModifiedProperties(); }