google-ar / arcore-unity-extensions

Google ARCore Extensions and Geospatial Creator for Unity's AR Foundation
Other
334 stars 94 forks source link

ARFoundation 5.1 cannot resolve cloud anchor #185

Open joellai opened 3 months ago

joellai commented 3 months ago

Hello,

I tried to build the cloud anchor sample in the documentation mentioned, but the resolve could not succeed (No any error, just infinitely try to resolve). But the host can succeed.

  1. I install the arcore-unity-extension based on git URL, and import the persistence anchor sample from asset manager https://github.com/google-ar/arcore-unity-extensions.git

  2. My unity arfoundation 5 sample is directly downloaded from https://github.com/Unity-Technologies/arfoundation-samples/tree/5.1

  3. I have set the ARCORE_USE_ARF_5 symbol in the project setting

  4. My unity editor version is 2021.3.29f1

  5. Build platform : iPhone

  6. Strategy, API key

  7. I tried the sample 4.0, it can resolve the anchor successfully. Build with arfoundation4

Looking forward for your reply.

ChristopheChevallier commented 3 months ago

Hi, I was having the same exact issue and after a few hours of trying to troubleshoot I figured that the xr origin in the arcoreextension gameobject in my scene had been reset to none. It likely happened when I upgraded to the latest arcoreextension (1.42) or the latest arfoundation (5.1.3) It now works for me with these versions.

I also upgraded from Earth.resolveAnchorOnTerrain() to Earth.resolveAnchorOnTerrainAsync() since the other one is deprecated but I don't believe it is what solved it.

I hope that helps!

Chris