I have a Unity 2019.4 client application for the Hololens 2 that needs to access eye tracking data from Unity’s Eyes API. That data will then be sent to a server application that will process the eye tracking data from the client.
Right now I am not able to see any eye tracking device when I get a list of InputDevices. I can only see my WindowsMR Headset and Hand when I print the list of InputDevices available. I enabled the GazeInput capability within Unity and the prompt to get permission to use eye tracking shows up in my headset. I don’t have MRTK installed on my client and I can’t install it for this application which is why its crucial for me to use the Eyes API from Unity.
Is there something that I’m missing that is preventing the eye tracking device from showing up?
Any help will be greatly appreciated!
Here is my code for accessing the list of InputDevices:
void OnEnable()
{
List<InputDevice> devices = new List<InputDevice>();
InputDevices.GetDevices(devices);
foreach(InputDevice device in devices)
{
Debug.Log("Device name " + device.name + " with characteristics " + device.characteristics.ToString());
}
}
Thank you! That was very helpful! My problem was that I was looking for a device with the characteristic EyeTracking, but the WindowsMR Headset had the EyeGaze features the whole time.
This was my code to see if EyeGazeAvailable feature was active:
List<InputDevice> devices = new List<InputDevice>();
InputDevices.GetDevices(devices);
bool inputValue;
foreach (InputDevice device in devices)
{
if (device.TryGetFeatureValue(WindowsMRUsages.EyeGazeAvailable, out inputValue))
{
Debug.Log("Device name: " + device.name + " EyeGazeAvailable: " + inputValue);
}
}
@joejo Is it possible to use these eye gaze features or any other available Unity eye tracking APIs for Hololens 2 with Built-in XR enabled instead of the XR Plugin model?