How do I reset the position of the headset?

I’m using a HoloLens to develop an AR application, and I need a manual function that resets the position.
I’m very confused on how to achieve this looking at the docs.
There’s Microsoft’s MRTK for Unity, the legacy XR plugin for Unity, and the new XR subsystem that I’m still wrapping my head around.

When I started this project I solely used just the MRTK following documentation for that. Now that I see a bunch of different ways to reset the position, and I haven’t found something that works yet, I’m very confused on what I should be following.

I’m working in Unity 2019.4

I tried this first VR.InputTracking.Recenter() but that doesn’t compile. It either doesn’t exist anymore in 2019.4 or I just can’t find the namespace it’s in.

Then I tried this from the new XR subsystem in the scripting API, but my XRInputSubsystem object always appears to be null, so I’m not sure how to use it. Having trouble finding concise examples.

inputSystem = new XRInputSubsystem();
inputSystem.Start();

Then I found this gitgist that shows a full initialization of what I was previously triyng. But that also led nowhere, because my XRGeneralSettings about is always null too. Even in the HoloLens app.

I’ve also ran into this thread trying to track down examples, but it’s really dense and overkill for what I"m triyng to do.

I just want a quick and simple way to reset the headset position and orientation.

I’m also not having any luck finding a “reset” or “recenter” function in the MRTK API either.
https://microsoft.github.io/MixedRealityToolkit-Unity/api/Microsoft.MixedReality.Toolkit.html

Im using it like this. While i don’t use the hololens i use the unity XR Plugin in system with the Windows XR Plugin.

Hopefully that helps.

List<InputDevice> devices = new List<InputDevice>();
InputDevices.GetDevices( devices );
if ( devices.Count != 0 )
{
    devices[0].subsystem.TryRecenter();
}

(Of course if you have multiple InputDevices you would need to get the correct one.)

Can’t use the new XR Plugin system in 2019.4 because its new version of the Remoting tool doesn’t work with HoloLens 2 and/or the latest version of MRTK yet (2.4.0 as of typing). Remoting is too critical to give up.

XR.InputTracking.Recenter() compiles with a deprecation warning. I made sure my MRTK profile’s Target Scale is set to “Standing” as specified in the docs, but it doesn’t seem to do anything.