using Godot; public partial class RootInit : Node3D { private XRInterface _xrInterface; public override void _Ready() { _xrInterface = XRServer.FindInterface("OpenXR"); if (_xrInterface != null && _xrInterface.IsInitialized()) { GD.Print("OpenXR initialized successfully"); // Turn off v-sync! DisplayServer.WindowSetVsyncMode(DisplayServer.VSyncMode.Disabled); // Change our main viewport to output to the HMD GetViewport().UseXR = true; } else { GD.Print("OpenXR not initialized, please check if your headset is connected"); } } }