Skip to content

Commit b476960

Browse files
RogPodgekeveleigh
andauthored
Clarified eye tracking settings wording and added links to documentation (#10535)
* Clarified eye tracking settings wording and added links to documentation * Update Assets/MRTK/Core/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs Co-authored-by: Kurtis <[email protected]> * PR feedback Co-authored-by: Kurtis <[email protected]>
1 parent 7dc873a commit b476960

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

Assets/MRTK/Core/Definitions/InputSystem/MixedRealityPointerProfile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ public SystemType GazeProviderType
8282
public bool UseHeadGazeOverride => useHeadGazeOverride;
8383

8484
[SerializeField]
85-
[Tooltip("If true, eye-based tracking will be used as gaze input when available. Requires the 'Gaze Input' permission and device eye calibration to have been run.")]
85+
[Tooltip("If true, eye-based tracking will be used as gaze input when available. This field does not control whether eye tracking data is provided.")]
8686
private bool isEyeTrackingEnabled = false;
8787

8888
/// <summary>
89-
/// If true, eye-based tracking will be used as gaze input when available.
89+
/// If true, eye-based tracking will be used as gaze input when available. This field does not control whether eye tracking data is provided.
9090
/// </summary>
9191
public bool IsEyeTrackingEnabled
9292
{

Assets/MRTK/Core/Inspectors/Profiles/MixedRealityPointerProfileInspector.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class MixedRealityPointerProfileInspector : BaseMixedRealityToolkitConfig
1616
private static readonly GUIContent MinusButtonContent = new GUIContent("-", "Remove Pointer Option");
1717
private static readonly GUIContent AddButtonContent = new GUIContent("+ Add a New Pointer Option", "Add Pointer Option");
1818
private static readonly GUIContent GazeCursorPrefabContent = new GUIContent("Gaze Cursor Prefab");
19+
private static readonly GUIContent UseEyeTrackingDataContent = new GUIContent("Use Eye Tracking Data");
1920
private static readonly GUIContent RaycastLayerMaskContent = new GUIContent("Default Raycast LayerMasks");
2021

2122
private const string ProfileTitle = "Pointer Settings";
@@ -31,7 +32,7 @@ public class MixedRealityPointerProfileInspector : BaseMixedRealityToolkitConfig
3132
private SerializedProperty gazeCursorPrefab;
3233
private SerializedProperty gazeProviderType;
3334
private SerializedProperty useHeadGazeOverride;
34-
private SerializedProperty isEyeTrackingEnabled;
35+
private SerializedProperty useEyeTrackingDataWhenAvailable;
3536

3637
private static bool showGazeProviderProperties = true;
3738
private UnityEditor.Editor gazeProviderEditor;
@@ -51,7 +52,7 @@ protected override void OnEnable()
5152
gazeCursorPrefab = serializedObject.FindProperty("gazeCursorPrefab");
5253
gazeProviderType = serializedObject.FindProperty("gazeProviderType");
5354
useHeadGazeOverride = serializedObject.FindProperty("useHeadGazeOverride");
54-
isEyeTrackingEnabled = serializedObject.FindProperty("isEyeTrackingEnabled");
55+
useEyeTrackingDataWhenAvailable = serializedObject.FindProperty("isEyeTrackingEnabled");
5556
pointerMediator = serializedObject.FindProperty("pointerMediator");
5657
primaryPointerSelector = serializedObject.FindProperty("primaryPointerSelector");
5758
}
@@ -82,7 +83,14 @@ public override void OnInspectorGUI()
8283
EditorGUILayout.PropertyField(gazeCursorPrefab, GazeCursorPrefabContent);
8384
EditorGUILayout.PropertyField(gazeProviderType);
8485
EditorGUILayout.PropertyField(useHeadGazeOverride);
85-
EditorGUILayout.PropertyField(isEyeTrackingEnabled);
86+
87+
EditorGUILayout.BeginHorizontal();
88+
EditorGUILayout.PropertyField(useEyeTrackingDataWhenAvailable, UseEyeTrackingDataContent);
89+
// Render a help link for getting started with eyetracking documentation
90+
string helpURL = "https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/input/eye-tracking/eye-tracking-basic-setup";
91+
InspectorUIUtility.RenderDocumentationButton(helpURL);
92+
EditorGUILayout.EndHorizontal();
93+
8694
EditorGUILayout.Space();
8795

8896
var gazeProvider = CameraCache.Main.GetComponent<IMixedRealityGazeProvider>();

Assets/MRTK/Core/Interfaces/InputSystem/IMixedRealityEyeGazeProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public interface IMixedRealityEyeGazeProvider : IMixedRealityGazeProvider
3333

3434
/// <summary>
3535
/// If true, eye-based tracking will be used when available.
36+
/// This field does not control whether eye tracking data is provided.
3637
/// </summary>
3738
/// <remarks>
3839
/// <para>The usage of eye-based tracking depends on having the Gaze Input permission set

0 commit comments

Comments
 (0)