Search Issue Tracker
Fixed
Votes
0
Found in [Package]
10.5.0
Issue ID
1358351
Regression
No
[XR SDK] [URP] Field 'xr' in the class 'CameraData' is inaccessable, marked as protected
Reproduction steps:
1. Open the attached project ("IncorrectAPIReport.zip")
2. Open the console window
Expected result: No errors in the console
Actual result: Error in the console:
Assets\ErrorScript.cs(13,37): error CS0122: 'CameraData.xr' is inaccessible due to its protection level
Reproducible with: URP 10.5.1, 11.0.0, 12.0.0 (2020.3.17f1, 2021.1.17f1, 2021.2.0b7, 2022.1.0a5)
Not reproducible with: URP 7.7.1 (2019.4.29f1 Assets\ErrorScript.cs(13,37): error CS1061: 'CameraData' does not contain a definition for 'xr' and no accessible extension method 'xr' accepting a first argument of type 'CameraData' could be found (are you missing a using directive or an assembly reference?))
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- WebGPU errors when CoreCopy shader is used to copy an MSAA texture
- Unity Cloud icon does not appear next to project and does not connect correctly when the project is created with Cloud but closed right after creation
- ScrollerSlider in the Scroller Control is still using UXMLTraits
- Crash on ExtractHandles when shutting down the Editor in a specific scene while Burst jobs are in progress
- Unity Hub closes with no "Project is currently open" window when selecting an already open project from the Projects list
Resolution Note:
XR field is not marked as public by design because we are actively working on exposing XR related public fields and methods.
We understand the requests in this case. Exposing xr related public methods and fields are being worked on and the process could be followed here: https://github.com/Unity-Technologies/Graphics/pull/3557