Search Issue Tracker

Fixed in 2021.1

Planned for 2019.4, 2020.1, 2020.2

Votes

6

Found in

2019.3.0b10

Issue ID

1196164

Regression

No

Switching targets in SRP projects will cause XR errors on some platforms

Scripting

-

Switching build targets in a project using Scriptable Render Pipelines will create reference errors to 'XRSettings' on platforms that do not support XR.

When working in a project utilising Universal Render Pipeline, if the user adjusts their build target to TVOS, the following blocking errors will appear:

Library/PackageCache/com.unity.render-pipelines.core@7.1.1/Runtime/Common/XRGraphics.cs(94,28): error CS0103: The name 'XRSettings' does not exist in the current context

Switching build targets back to the original target will not correct this issue alone and the user must restart the editor in addition to resetting the target.

Steps to reproduce:
- On an OSX machine, Create a new Unity project using the Universal RP template (found in 2019.3.0b10)
- File > Build Settings > iOS > "Switch Platform"
- Observe there are no errors
- File > Build Settings > tvOS > "Switch Platform"
- Observe the above noted exception now will appear
- File > Build Settings > iOS > "Switch Platform"
- Observe the previous errors remain
- Restart the Unity editor and re-open the project
- Observe the errors no longer appear

Comments (2)

  1. 6c67e304047999418253ea0701275959?d=mm

    ustincameron

    Aug 26, 2020 19:32

    Does anyone know how to resolve this? Switching to tvOS platform created this error for me and now I'm unable to build for any other platform...

  2. 456a37ca40e3791cadb6a39b79950177?d=mm

    QAG_Alex

    May 20, 2020 16:49

    I'm also seeing this when switching between console platforms (XboxOne, PS4, and Switch).

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.