I am currently developing an app for the Hololens 2 with Unity and mrtk. I am trying to get the Gaze direction from the GazeProvider.cs which is attached to the camera, because i want to spawn objects in front of the players face. I am trying to access it like the mrtk site states:
void LogGazeDirectionOrigin()
{
Debug.Log("Gaze is looking in direction: "
+ CoreServices.InputSystem.GazeProvider.GazeDirection);
Debug.Log("Gaze origin is: "
+ CoreServices.InputSystem.GazeProvider.GazeOrigin);
}
However when trying to using Microsoft.MixedReality.Toolkit;
the error
the type or namespace name 'mixedreality' does not exist in the namespace 'microsoft' (are you missing an assembly refrence?)
occurs. Therefore CoreServices is also not recgonized. Also i recognised, that the GazeProvider.cs hat this path in the package folder Packages/com.microsoft.mixedreality.toolkit.foundation/Services/InputSystem/GazeProvider.cs. I don't know how to fix this or how to access the gaze direction of the player, i have been searching for a while now.
I would appreciate some help, thanks!