Closed tfine closed 6 years ago
Ok, it seems the latest version of Unity is not supported (at least on iOS?)? It worked in 2017. You might want to put this in the README if that's the case.
@tfine SDK should work with all current versions of Unity, I just tried with latest beta 2018.2.0b4
.
Do you see any error messages in the console?
Yes, there are three errors on load (two yellow, one red)
YELLOW: Assets/GoogleARCore/SDK/Scripts/Editor/BuildHelper.cs(33,18): warning CS0618: UnityEditor.Build.IPreprocessBuild' is obsolete:
Use IPreprocessBuildWithReport instead'
RED: Assets/GoogleARCore/SDK/Scripts/Editor/BuildHelper.cs(33,18): error CS0535: GoogleARCoreInternal.BuildHelper' does not implement interface member
UnityEditor.Build.IPreprocessBuild.OnPreprocessBuild(UnityEditor.BuildTarget, string)'
YELLOW: Metal: Fragment shader missing texture binding at index 0 (_MainTex / Hidden/GUITextureBlit2SRGB)
RED: Assets/GoogleARCore/SDK/Scripts/Editor/BuildHelper.cs(33,18): error CS0535:
GoogleARCoreInternal.BuildHelper' does not implement interface member
UnityEditor.Build.IPreprocessBuild.OnPreprocessBuild(UnityEditor.BuildTarget, string)'
That's why it's not working. A bug in GoogleARCore
preventing Unity from compiling files.
Two options:
if you don't need AR support delete these folders:
if you need AR apply this fix to sdkproject/Assets/GoogleARCore/SDK/Scripts/Editor/BuildHelper.cs
https://github.com/mapbox/mapbox-unity-sdk/compare/2018-fixes#diff-21e75b07f3ff813cb6f8195f156b5c25
Solution doesent seem too clear. Do these folders need to be deleted from the asset menu? Does the package need to be reimported. Instructions that are a bit less vague would be helpful. Thanks.
@suraj1988 If your application does not need AR - delete the folders mentioned above. No need to reimport the package
If you need AR - do not delete folders and apply the patch linked above.
I had the same problem and simply (and temporary) changed the BuildHelper.cs code. Let it implements both versions OnPreprocessBuild(BuildReport report)
and OnPreprocessBuild(BuildTarget target, string path)
.
Everything is good now.
It appears that this seems to be a problem again. The link to the fix doesn't work any more. Using Unity 2019.1.3f1 on macOS:
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?)
@aaronmckeehan
Unity 2019 moved some core classes to packages so you're getting that missing class
error. If you install ArFoundation
package (which now contains those classes), it should fix that error.
Thanks! I saw that BuildHelper depended on ARCore. Installing the XR Legacy Input Helpers fixed my issue.
Installing the XR Legacy Input Helpers from Window > Package Manager fixed my issue too.
Thanks @caglisto and @aaronmckeehan. Installing the XR Legacy Input Helpers fixed my issue in Unity 2019.1.6f1
I can find the same issue in the new unity 2021 and in Mapbox sdk v2.1.1. I can't find an option to add the XR Legacy Input Helpers. Tried Installing ARFoundation and ARCore XR plugin and reimporting all as found on some forum, but still its not throwing errors and also its not giving me the dialog for mapbox settings to add the API Key.
I can find the same issue in the new unity 2021 and in Mapbox sdk v2.1.1. I can't find an option to add the XR Legacy Input Helpers. Tried Installing ARFoundation and ARCore XR plugin and reimporting all as found on some forum, but still its not throwing errors and also its not giving me the dialog for mapbox settings to add the API Key.
The following is the errors that i have now.
Assets\GoogleARCore\SDK\Scripts\ARCoreBackgroundRenderer.cs(43,17): error CS0246: The type or namespace name 'ARBackgroundRenderer' could not be found (are you missing a using directive or an assembly reference?)
Assets\UnityARInterface\ARRemote\Scripts\ARRemoteEditorInterface.cs(40,17): error CS0246: The type or namespace name 'ARBackgroundRenderer' could not be found (are you missing a using directive or an assembly reference?)
Assets\UnityARInterface\Scripts\ARCoreInterface.cs(51,17): error CS0246: The type or namespace name 'ARBackgroundRenderer' could not be found (are you missing a using directive or an assembly reference?)
Assets\UnityARInterface\Scripts\ARKitInterface.cs(26,17): error CS0246: The type or namespace name 'ARBackgroundRenderer' could not be found (are you missing a using directive or an assembly reference?)
Unity 2018.1.02f Mapbox SDK 1.4.2 macOS 10.13.4
Trying to install the Unity SDK on a Mac, but the menu does not appear after importing. The full asset folder is available.