Skip to content

Conversation

@nnra6864
Copy link

This PR aims to fix errors and warnings within Unity 6(LTS) while staying compatible with previous versions.

@nnra6864
Copy link
Author

This is mostly complete and ready for review, except for a single line of code.
I couldn't figure out what's the correct replacement for:

get { return XRDevice.GetNativePtr() != System.IntPtr.Zero; }

Osmal from the Unity discord server guessed this is supposed to be a simple null check for the xr device, so I wrote this with the help of Unity docs:

get { return UnityEngine.XR.InputDevices.GetDeviceAtXRNode(XRNode.Head) != null; }

But I have a feeling that's not the same as the code above.

References to docs I used:
https://docs.unity3d.com/6000.3/Documentation/ScriptReference/UnityEngine.XRModule.html
https://docs.unity3d.com/6000.3/Documentation/ScriptReference/XR.XRNode.html

@nnra6864 nnra6864 marked this pull request as ready for review December 16, 2025 11:08
@nnra6864
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant