In upgrading one of my VR projects to the latest com.unity.xr.visionos package I found that the Package Manager actually provides version 0.5.0 rather than 0.4.3. When I upgrade to 0.5.0 my project no longer compiles as the VisionOSProjectValidation.cs is attempting to include UnityEngine.Rendering.Universal which is not in my project (this project uses the built-in render pipeline). The problem is being caused by the Unity.XR.VisionOS.Editor assembly definition using com.unity.render-pipelines.core to set the UNITY_HAS_URP define as this project does have the com.unity.render-pipelines.core package in it. The Unity.XR.VisionOS.Editor assembly definition should probably be changed to use com.unity.render-pipelines.universal to set the define or have a different define for the Universal assembly vs. the Core assembly.
Hey there!
You’re right–that was a miss on our part. We’ll get this fixed in the next release, but in the meantime you can make a local copy of com.unity.xr.visionos
and modify that assembly definition to depend on com.unity.render-pipelines.universal
, not core
.
Thanks for reporting!
Hi, I have followed these instructions, but am now encountering an error when building in unity:
This corresponds to the following code in VisionOSBuildProcessor.cs:
{
return Path.GetFullPath(AssetDatabase.GUIDToAssetPath("bdb2b35a4686f4d8ca0540be9862764d"));
}
Any idea what I’m doing wrong or how to fix this?
Just in case, here are the steps I followed:
- copy com.unity.xr.visionos from the packages folder into my Assets folder
- change its editor assembly def to depend on com.Unity.render-pipelines.universal
- remove com.unity.xr.visionos from the package manager
- re-add ARFoundation to the project from the package manager
Thanks!
@puddle_mike in case this helps: have you tried in Unity 2022.3.12f and Xcode Version 15.1 beta (15C5028h)? We encountered issues with Unity 2022.3.11.
I’m actually still in .11, was trying not to change two things at once. Thanks for the tip, I’ll try that!!
Hm… that error seems to be saying it can’t find the path for that asset. It’s possible that you somehow ended up with two copies of the xr.visionos package, which would cause Unity to re-assign all the guids for the local, mutable copy. If that happened, you’d see a bunch of warnings to that effect, and the guid for that asset would change, resulting in this error.
Can you try the process again but this time copy the package to Packages/
and remove it from the project manifest file before focusing the Editor?
Sorry for all this confusion. We should have a new release out shortly to fix this. Also, to be sure, @puddle_mike do you have a custom render pipeline? The only reason I would expect you to need this workaround is if you had a package other than URP that depends on the render-pipelines.core package.
I upgraded to 2022.3.12 and reverted to the package manager supplied version of com.unity.xr.visionos and everything seems to work now. @mtschoen we don’t have a custom render pipeline (we use built-in), but I had assumed I needed to do this given @OwlchemyDawson’s experience. Thanks for the help all around
Hi, any update on when the next release with the com.unity.render-pipelines.universal
fix will be released ? It’s been 2 weeks now and this error keeps arbitrarily coming back
Hi there! The issue with UNITY_HAS_URP
was addressed in our 0.6.2 release. Were folks able to upgrade and resolve this?