google-ar / arcore-unity-sdk

ARCore SDK for Unity
https://developers.google.com/ar
Other
1.4k stars 402 forks source link

Cloud Anchors broken in Editor (1.14.0) #680

Open uffeflarup opened 4 years ago

uffeflarup commented 4 years ago

SPECIFIC ISSUE ENCOUNTERED

Hosting (and resolving) cloud anchors doesn't work in Unity Editor when using Instant Preview.

VERSIONS USED

STEPS TO REPRODUCE THE ISSUE

  1. Start the CloudAnchors scene from the SDK examples, running it in Unity Editor
  2. Scan a surface using Instant Preview, tap to place an anchor on the surface
  3. You now get an "Failed to host Cloud Anchor: ErrorInternal" error

WORKAROUNDS (IF ANY)

Works when building for Android and iOS, but being able to test and debug in Editor is very important.

ADDITIONAL COMMENTS

james-broe commented 4 years ago

Hey @uffeflarup did you ever get a workaround for this? Am running into exactly the same issue.

Nachodlv commented 4 years ago

It also happens for Unity 2019.3.0 inside the Editor. It works when building for Android

Nachodlv commented 4 years ago

image I don't know if it helps but I found this when creating an anchor inside the editor. The method is from the file \GoogleARCore\SDK\Scripts\Api\Wrappers\SessionApi.cs.

The method ExternApi.ArSession_hostAndAcquireNewCloudAnchor is returning ErrorInvalidArgument. The input was: m_NativeSession.SessionHandle: 0x7ffb73b6a66f platformAnchorHandle: 0x435d9cff cloudAnchorHandle: 0x0

Nachodlv commented 4 years ago

@james-broe could you fix it?

KyryloKuzyk commented 3 years ago

My plugin now supports testing ARCore Cloud Anchors in the Unity Editor: https://assetstore.unity.com/packages/tools/utilities/ar-foundation-remote-2-0-201106