We are facing an issue on upgrading the Unity 2022.3.12f version in the URP-QNX platform build. I’m getting an error, and it stopped build like
Error:
Library\PackageCache\com.unity.render-pipelines.core@14.0.9\Runtime\XR\XRMirrorView.cs(3,19): error CS0234: The type or namespace name ‘XR’ does not exist in the namespace ‘UnityEngine’ (are you missing an assembly reference?)
We are not using XR, but still, an issue is coming, and we notice the QNX build gets passed without URP. There is some issue in the URP template with the QNX build.
we tried in many ways, like
- Clear the library folder and re-import.
- Added package of XR Plugin Management and XR Interaction Toolkit.
- Noted issue also in the Empty URP project.
there is no use in the above steps.
screen shots below:
This is a known issue due to XR not being supported on QNX, but being expected by the URP package. This can be resolved by removing the erroneous line.
using UnityEngine.XR;
There are be no other dependencies and an upcoming update to the URP package will resolve this issue.
Alternatively, if you work on a multi-platform project and would like to keep this functional on other platforms with the same package, you can wrap this into conditional compilation.
#if ENABLE_VR && ENABLE_XR_MODULE
using UnityEngine.XR;
#endif
Thanks Romano, the issue was resolved with the fix. When can we expect the URP update for the 2022.3.12 version?
This is currently being backported, along with other updates to make the new version.
In the meantime, you may consider the version with this change your supported version.
If it helps, we can provide a temp unity package with the fix that can be installed using the package manager (so you can distribute this internally), but you’ll have the same effect by just distributing the updated package with this small code modification you have already made.
I just tested this again using a clean install of the QNX package for 2022.3.27 and the issue is fixed so you can go back to using the default, unmodified URP package 