The 2023.04 release includes support for working with Unity’s Legacy XR implementation. To use this feature, simply enable XR Hooks through the GDIOAgent configuration:


Or using the API:

api.EnableHooks(HookingObject.XRLEGACY);

Input calls use the same paths as with the Input System, i.e. using ButtonPress and InputEvent actions, but using paths set by the agent:

  • GDIOHMD for the Headset
  • GDIOLeftHand for the Left Controller
  • GDIORightHand for the Right Controller


Example for setting the location of the HMD:

api.Vector3InputEvent("GDIOHMD/centerEyePosition", new Vector3(0.0f, 1.8f, 0.0f), 0);


Some additional device paths can be used for setting the position and rotation of the simulated devices:

GDIOHMD/centerEyePosition
GDIOHMD/centerEyeRotation
GDIOLeftHand/devicePosition
GDIOLeftHand/deviceRotation
GDIORightHand/devicePosition
GDIORightHand/deviceRotation


Legacy XR is also supported by the GameDriver Recorder and can be used to determine the inputs to be used for testing. If the project contains both old and new input systems, checking the “Force Old Input System“ may be required. An example test is attached and includes a recording from the Escape Room tutorial project from Unity.