mapbox / mapbox-unity-sdk

Mapbox Unity SDK - https://www.mapbox.com/unity/
Other
724 stars 210 forks source link

Error on import mapbox sdk version 2.1.0 in unity #1487

Closed dhruvmodhapp closed 5 years ago

dhruvmodhapp commented 5 years ago

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?)

Screenshot 2019-10-15 at 10 55 17 AM

brnkhy commented 5 years ago

Hey @dhruvmodhapp! You probably important all folders, including AR ones in the SDK package. Mapbox Unitu SDK AR stuff is dependant on Unity's own ArFoundation package at the moment. If you install ArFoundation package through Package Manager window (or delete AR folders in case you don't need them), you can get rid of that error. Hope that helps!

Edit: Closing this for now, feel free to reopen if you have follow up questions.

dhruvmodhapp commented 5 years ago

I haven't install ARFoundation from Package Manager. I've just created a unity project with version 2019.3.0a2 and the latest Mapbox SDK Version 2.1.0. Run and it gives an error.

yang-jian0227 commented 4 years ago

Hey @dhruvmodhapp! You probably important all folders, including AR ones in the SDK package. Mapbox Unitu SDK AR stuff is dependant on Unity's own ArFoundation package at the moment. If you install ArFoundation package through Package Manager window (or delete AR folders in case you don't need them), you can get rid of that error. Hope that helps!

Edit: Closing this for now, feel free to reopen if you have follow up questions.

hi @brnkhy i still have problem.i have installed the AR Foundation package and also the package ARcore XR plugin.i use the unity 2019.4.0f1 version and mapbox-unity-sdk_v2.1.1.

Assets\Mapbox\Unity\Location\DeviceLocationProvider.cs(321,12): error CS0103: The name 'heading' does not exist in the current context Assets\Mapbox\Unity\Location\DeviceLocationProvider.cs(321,27): error CS0103: The name 'heading' does not exist in the current context Assets\Mapbox\Unity\Location\DeviceLocationProvider.cs(322,12): error CS0103: The name 'heading' does not exist in the current context Assets\Mapbox\Unity\Location\DeviceLocationProvider.cs(322,30): error CS0103: The name 'heading' does not exist in the current context Assets\Mapbox\Unity\Location\DeviceLocationProvider.cs(323,37): error CS0103: The name 'heading' does not exist in the current context

it also says: component at index 2 could not be loaded when loading gameobject'ARCamera',remove it.

yang-jian0227 commented 4 years ago

i solve it!the documentation of mapbox-unity-sdk_v2.1.1 has coding errors.

eldamir commented 4 years ago

Based on discussion here, I elected to only import the "Mapbox" and "ThirdPartyAssets" folder from the package, and I could do what I needed.

Installing the ARFoundation solved the issue in the sense that things now worked in the editor, but trying to build for WebGL threw a tonne of errors.

Starting over and only importing the two folders above made for a successful WebGL build for me, and as I don't need AR for my use cases, I guess I won't have any trouble going forward.

Just my notes for anyone finding their way here as I did 😉

nodeDevcoder commented 3 years ago

@eldamir It worked! Hooray!