Closed pinnakkkk closed 6 months ago
Hi, have you solved this bug or found any workaround? I am facing the same issue on Android. Thanks.
Hi, have you solved this bug or found any workaround? I am facing the same issue on Android. Thanks.
Not really, it works fine in the editor.
@tdmowrer could please look into this?
Hi folks -- I no longer work at Unity. I suggest you file an issue if you haven't already.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is also the issue I am facing. Is there any sort of solution or alternative way of loading reference libraries from assetbundles during runtime?
I have tried the following:
Note: Manually assigning the reference library to the ARTrackedImageManager in the editor and making a build works as expected.
I'm still finding the same issue, and have been unable to find a workaround for this. Did anyone file an issue and get a helpful response?
I've filed a bug report: IN-52144.
I'll report back once I get a response.
Linking a forum post here to aid the investigator whenever this is assigned: https://forum.unity.com/threads/loading-xrreferenceimagelibrary-through-addressables-runs-in-editor-but-android-builds-crash.1327917/#post-9403268
Thanks, Andy! This looks very similar, but in my case it won't run in editor, either. It gives the error: “InvalidOperationException: Failed to load XRReferenceImageLibrary ‘LIBRARY NAME’: library does not contain any ARCore data.“ is present
IN-55364
Hi all, we finally got this issue assigned to a developer. Sorry that it took so long.
The issue in all cases appears to be this very hidden method called ARBuildProcessor.PreprocessBuild. You must call this method before you build AssetBundles in order for the AssetBundles to contain the necessary image library data.
This is obviously non-intuitive and completely undocumented except for a single comment in the scripting API docs. We are working on a bunch of changes to all versions of AR Foundation to make this easier and better documented, but in the meantime you should be able to test the fix on your end by adding this method call as part of your AssetBundle process.
In AR Foundation 6.0.0-pre.5 we added a new "Build AssetBundles" window that makes building AssetBundles easier and calls ARBuildProcessor.PreprocessBuild
for you. More information in our docs.
We have also backported better AssetBundle documentation to older versions, which will be coming out soon.
I'm going to close this issue as fixed, but feel free to re-open it if you have further concerns that are not addressed.
I encountered the same issue in version 2022.3.20f1.
Initially, I thought there might be an issue with the Unity version or the AR Foundation plugin. However, it turned out not to be the case. I tried the same steps in the Unity 6 beta version.
In the editor with XR Simulation everything works correctly, but in the build, I have the error XRReferenceImageLibrary library does not contain any ARCore data
. Moreover, the error is only visible through Logcat, the build proceeds without any errors or warnings.
So, as I understood, there could be two reasons for this problem:
ARBuildProcessor.PreprocessBuild
- Documentation.ReferenceImage
because their tracking quality is not high enough. My issue was with the images.
After attempting to build the project using Addressables, according to documentation, I encountered a new error - Failed to get enough keypoints
. I realized that the problem might be with the images that were being used. So, I checked them via Arcoreimg Tool and found that one of them resulted in 0% and the other one in 10%. After I replaced the images with new ones that were rated at 100%, and everything started working as expected.
Hello Team, I am trying to download an XR image library AssetBundle from the cloud & load it at runtime. The AR Foundation documentation this says it is possible. The code works at runtime in editor, I could open the XR Library & it has all the images & import data. However it doesn't work at runtime on android.
To Reproduce Steps to reproduce the behavior: Code snippet to used to create an assetbundle.
Code to load the assetbundle.
Expected behavior Downloaded Library should have been loaded & ready for detection.
Actual behavior
Smartphone (please complete the following information):
Attempted Fixes