You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing the latest version 2.4.0 into Unity where the build target is set to WebGL or iOS or anything except standalone and android there are a number of errors in the console, preventing builds.
..
Library\PackageCache\com.htc.upm.vive.openxr@3dd72f5\Runtime\CompositionLayer\Scripts\CompositionLayerPassthroughAPI.cs(641,22): error CS0161: 'CompositionLayerPassthroughAPI.SetPassthroughLayerType(int, LayerType, uint)': not all code paths return a value
...
👍 for fixing this in the "next release". For anyone who finds there way here, the solution is as follows: go into PackageCache, take the imported codebase, pull it into your Packages folder, and update manifest.json as follows:
This way, you can go into CompositionLayerPassthroughAPI.cs and modify it as needed. In my case, the modification was to add something like this to each of the functions that otherwise lack return values:
When importing the latest version 2.4.0 into Unity where the build target is set to WebGL or iOS or anything except standalone and android there are a number of errors in the console, preventing builds.
..
Library\PackageCache\com.htc.upm.vive.openxr@3dd72f5\Runtime\CompositionLayer\Scripts\CompositionLayerPassthroughAPI.cs(641,22): error CS0161: 'CompositionLayerPassthroughAPI.SetPassthroughLayerType(int, LayerType, uint)': not all code paths return a value
...
In those functions there is an ifdef missing:
#if !(UNITY_STANDALONE || UNITY_ANDROID)
return false;
#endif
This prevents us from using this version of the sdk as we are building for multiple targets, please fix asap.
Thanks,
Martin
The text was updated successfully, but these errors were encountered: