mapbox-unity-sdk icon indicating copy to clipboard operation
mapbox-unity-sdk copied to clipboard

AR Camera not working

Open Flovermeer opened this issue 4 years ago • 6 comments

Note: If this is a bug or support ticket, please provide the following information:

  • Unity version: 2019.3.10f1
    • Scripting Runtime Version:
    • Scripting Backend: Mono
    • Api Compatibility Level: Android 24
  • Mapbox SDK version: 2.1.1
  • The platform you're building to: Android
  • A description of what you're trying to do:
  • Steps to recreate the bug if appropriate: Create an empty project, switch to Android, Import ArCore and ArFoundation. Import Mapbox sdk and run any AR example.
  • Links to your logs are also helpful:

Hi, I'm trying to run the AR examples from the mapbox sdk, but the camera stays black (or blue, it depends of the examle). I've installed ARCore and ARFoundation. What can I do to make it work ?

Thanks

Flovermeer avatar Jun 02 '20 14:06 Flovermeer

You only need to import Mapbox SDK with MapboxAR. The SDK will automatically import GoogleARCore and UnityARInterface. Try to import only SDK without importing ARFoundation and ARCore from Unity Package Manager.

dm67x avatar Jun 08 '20 08:06 dm67x

I think we're getting the same issue. Still trying to repro it on multiple devices - but did you get anywhere with this? Did you fix it?

bentuhoekenobi avatar Oct 27 '20 01:10 bentuhoekenobi

there are ARCORE errors on scripts if you JUST install the unity package (using 2019.4)

Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewManager.cs(32,23): error CS0234: The type or namespace name 'SpatialTracking' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

ashleyjamesbrown avatar Nov 11 '20 09:11 ashleyjamesbrown

@asheemmamoowala I don't know much about AR but I think you might need to install ArFoundation package from PackageManager to fix that error. Our SDK AR doesn't use ArFoundation but since Unity moved some classes from core to that package, sdk isn't able to find those files.

brnkhy avatar Nov 17 '20 13:11 brnkhy

Anyone solve this issue? I have been following this link [https://github.com/mapbox/mapbox-unity-sdk/issues/1459] it helped me solve the errors but AR camera isn't working on Android

Bullseye25 avatar Apr 08 '21 08:04 Bullseye25

Problem fixed here : https://youtu.be/c6Zbqm5Fys8

ahmedaniss25 avatar May 05 '21 12:05 ahmedaniss25