-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix xr_v2 OpenXR Android #222
Comments
If we use the AndroidManifest.xml in plugins/Android (player project override) we can build and install our Android package, but it won't launch. This appears to be because the main activity has not launch intent. If we untick the project override, and let Unity automatically make a manifest we get a compilation error. GoogleVR appears to conflicting with the Unity generated manifest. The keyboard properties conflict. Note: Currently GoogleVR is what is used for all of the default audio (I think, regardless of the platform). The solution to this was to remove GVR, as Unity merges manifests and GVR contains old keyboard manifest which clashes with Unity. Also I think the GVR main intent hijacks the Unity one. Ideally, what we want to do is use the default Unity generated manifest and merge in any additional permissions that we require, e.g. passthrough. |
I'm using my Unity adb wrapper |
OpenXR Android requires ARM64, which requires IL2CPP. ARM64 is broken because of some assemblies that don't support it, e.g. NewtonSoft JSON, and PNGCs. - See #209. We can update the above assemblies to fix this problem. The problem then becomes building ARM64. There currently issues with Gradle. It seems other people have encountered this error. Gradle was upgraded in Unity 2020.3.14f1.
So the error which appears to be causing the problem is:
In task OpenBrushMp/Temp> find . -name 'libopenxr_loader.so'
./gradleOut/unityLibrary/build/intermediates/library_jni/debug/jni/arm64-v8a/libopenxr_loader.so
./gradleOut/unityLibrary/build/intermediates/merged_jni_libs/debug/out/arm64-v8a/libopenxr_loader.so
./gradleOut/unityLibrary/build/intermediates/merged_native_libs/debug/out/lib/arm64-v8a/libopenxr_loader.so
./gradleOut/unityLibrary/build/intermediates/stripped_native_libs/debug/out/lib/arm64-v8a/libopenxr_loader.so
./gradleOut/unityLibrary/src/main/jniLibs/arm64-v8a/libopenxr_loader.so
./StagingArea/libs/arm64-v8a/libopenxr_loader.so This problem goes away if you uninstall the Unity OpenXR plugin whilst the Oculus XR plugin is installed. |
With GoogleVR removed, the GvrAudioSource is removed. This has been renamed (temporarily?) to the Unity AudioSource. Related issue #185. OpenXR has audio on the way.: https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_OCULUS_audio_device_guid |
Noting that we've changed over to IL2CPP during this process but we have noted issues that were previously reverted: #209 Updated with new data: #209 (comment) |
We currently have a lack of consistency. Mike can run on Android but I get a black screen. Still getting silent problems, removing all of GVR doesn't work so there must be something in there being used, but if you remove it there are no warnings or errors at compilation or runtime. Or at least, nothing that looks relevant. Mike is on 2020.3.27. I am on 2020.3.22. I will update to see if there are Unity Android changes, that perhaps make a difference. I updated to Unity 2020.3.29 but still have issues. Oculus link mode not working, or Android. Runs in editor but no link preview in device. Android compiles and runs but black screen. - UnityXR mode, Oculus OpenXR mode, with and without Unity OpenXR plugin. |
PC version (standalone and Unity) contains the following error which looks to stop brushes being created. So you can run the PC version but can't draw. - Controller rotations are wrong in PC version so we may have to rotate per version.
This appears to happen because we switched to Net 2.0 support. If I revert back to Net 4.x standalone works and has brushes. Oculus link still not previewing with this setting. Moving back to Oculus XR and not Unity OpenXR fixes Oculus link. |
Oh joy, now I'm getting an error on building Android,
Initial guess: I think this is due to a filepath being too long. 🤦 "C:\Code\Public\Builds\UnityXRMobile_Debug_OpenBrush_Il2cpp_FromGui\com.icosa.openbrush.apk\unityLibrary\src\main\assets\Support\shaders\brushes\CoarseBristles-1161af82-50cf-47db-9706-0c3576d43c43\CoarseBristles-1161af82-50cf-47db-9706-0c3576d43c43-v10.0-MainTex.png"" Looks like other people had similar issue. Trimmed root length appears to work now. Apparently in Win 10 the MAX_PATH = 260 limit has been removed, but you have to opt-in. |
I think this is the case, @PerlinWarp had a similar issue i think? |
ExportFbx relies on the vendor name being present in App.cs, which was changed in 234624f. This will only be caught in editor if the |
With current work UnityXR PC build appears to work, using Oculus XR plugin, and Oculus link works. However Android, builds, installs but does not display. Getting this error spamming a lot:
xrGetReferenceSpaceBoundsRect docs. "The runtime must return XR_ERROR_REFERENCE_SPACE_UNSUPPORTED if the XrReferenceSpaceType passed in createInfo is not supported by this session." A reference space appears to be created without error. Not sure if this is the same reference space as the one in the error spam.
Upgraded to Unity 2020.3.29 from 2020.3.22, reset Library, and then this eventually worked. There are fixes in 23-29. Also had to uninstall 22 and reset Library again. |
This mostly seems to be working now. The final issue, and why the launch intent wasn't found was that the package name was wrong. Unity appends "unityeditor" to the name. This is fixed in the branch. You can use |
@mikeage is having issues with Oculus spatializer building for CI. Need a repro. |
We discovered TB didn't use the Oculus Spatializer as the README didn't specify importing it for builds. |
@billyquith Do you feel this is in a good place to close out w.r.t compatibility on quest 2? I feel other android headsets deserve their own issues to track, but this should be fairly stable on quest now. |
The
xr_v2
branch has a broken Android build. Notes on fixing.The build appears to compile and link without error. It can be installed on a device but there appears to be no launch activity, so it it just hangs on the loading screen. The expected activity is
com.unity3d.player.UnityPlayerActivity
.The text was updated successfully, but these errors were encountered: