mapbox-unity-sdk
mapbox-unity-sdk copied to clipboard
AR Camera not working
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
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.
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?
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?)
@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.
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
Problem fixed here : https://youtu.be/c6Zbqm5Fys8