Search Issue Tracker

Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.

Postponed

Votes

3

Found in [Package]

12.0.0

Issue ID

1348371

Regression

No

[XR] [URP] [tvOS] error when accessing UnityEngine.XR is not informative "the type name 'XRSettings' could not be found ..."

Package: Scriptable Render Pipeline Universal

-

Reproduction steps:
1. Create a new URP template project
2. Create a new script
3. In the Start() method enter line "Debug.Log(UnityEngine.XR.XRSettings.enabled);"
4. In editor switch platform to tvOS
5. Inspect the console

Expected result: there are either no errors (meaning XR code is compiled properly on tvOS) or the error explains why XR does not work on tvOS
Actual result: an uninformative error is thrown (full error below) and the solution it proposes does not work

Reproducible with: 7.7.0 (2019.4.29f1), 11.0.0 (2021.1.15f1), 12.0.0 (2021.2.0b3, 2022.1.0a2)
Not reproducible with 4.10.0 (2018.4.36f1), but I do not think this would be classified as a regression

Notes:
1. XR is currently not expected to work with tvOS since URP checks #if ENABLE_VR && ENABLE_VR_MODULE, however, these definitions are not available in tvOS
2. Error says to enable VR module in Package Manager, but in URP projects it is enabled by default so the proposed solution will not work

Error:
The type name 'XRSettings' could not be found in the namespace 'UnityEngine.XR'. This type has been forwarded to assembly 'UnityEngine.VRModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' Enable the built in package 'VR' in the Package Manager window to fix this error.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.