mapbox / mapbox-unity-sdk

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

The type or namespace name 'ARBackgroundRenderer' could not be found #1753

Open Msnkhosravi opened 3 years ago

Msnkhosravi commented 3 years ago

Unity version 2020.2.2 trying to import Mapbox but it won't get imported with the error: The type or namespace name 'ARBackgroundRenderer' could not be found.

Is there any way to fix it?

I already tried importing ARFoundation package and ARCore Package but non are working.

Thanks in advance

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

matt-heavy commented 3 years ago

Also trying to resolve this.

Tried resolving the errors by switching ARBackgroundRenderer to ARCameraBackground as some of the properies seemed similar, but not getting any camera feed when I build.

Sailendrakc commented 3 years ago

Any fix or workaround yet?

soulio2005 commented 3 years ago

Any fix yet ?

Sailendrakc commented 3 years ago

I deleted the AR related folders and assets that comes with mapbox and it worked. I use ar foundation from unity package manager.

abullard commented 3 years ago

I deleted the AR related folders and assets that comes with mapbox and it worked. I use ar foundation from unity package manager.

Confirming this comment. This error was blocking the Mapbox Setup window from opening. After removing Mapbox's AR related content, the C# scripts compiled without error and the Setup window opened.

Note (for the purposes of having this documented somewhere): I installed ARKit XR Plugin v4.0.12 (for iOS support) and AR Foundation v4.0.12 to get AR support on my Unity Project. My project also used Mapbox Unity SDK v2.1.1.

Thanks for the help @Sailendrakc

sam1am commented 3 years ago

Running into this as well. The Mapbox SDK fails to install in the latest LTS version of Unity. Documentation needs to be updated on the install page to tell you which libraries or dependencies need to be installed. Reverting to 2019 LTS release and installing the XR Plugin Management package in the package manager got me up and running.

soulio2005 commented 3 years ago

I deleted the AR related folders and assets that comes with mapbox and it worked. I use ar foundation from unity package manager.

Confirming this comment. This error was blocking the Mapbox Setup window from opening. After removing Mapbox's AR related content, the C# scripts compiled without error and the Setup window opened.

Note (for the purposes of having this documented somewhere): I installed ARKit XR Plugin v4.0.12 (for iOS support) and AR Foundation v4.0.12 to get AR support on my Unity Project. My project also used Mapbox Unity SDK v2.1.1.

Thanks for the help @Sailendrakc

I deleted the AR related folders and assets that comes with mapbox and it worked. I use ar foundation from unity package manager.

Confirming this comment. This error was blocking the Mapbox Setup window from opening. After removing Mapbox's AR related content, the C# scripts compiled without error and the Setup window opened.

Note (for the purposes of having this documented somewhere): I installed ARKit XR Plugin v4.0.12 (for iOS support) and AR Foundation v4.0.12 to get AR support on my Unity Project. My project also used Mapbox Unity SDK v2.1.1.

Thanks for the help @Sailendrakc

Hello there, can you tell me the exact folders you deleted? may thanks

TaylorAbraham commented 3 years ago

@soulio2005 I got it working by deleting GoogleARCore, MapboxAR, and UnityARInterface. This may cause issues if you want to use the AR parts of Mapbox, but I was just looking to use Mapbox for the maps so this worked for me. Hope this helps :)

Sreee47 commented 3 years ago

This same issue persist on Unityt 2021.1.5f1. Is there any work around to use the MapboxAr feature? I have added all ARCore plugins and Arfoundation plugins. But the ARBackgroundRenderer still persists. image

flimbo commented 2 years ago

This same issue persist on Unityt 2021.1.5f1. Is there any work around to use the MapboxAr feature? I have added all ARCore plugins and Arfoundation plugins. But the ARBackgroundRenderer still persists. image

I had same problem, when you check Channelog for ARFoundation you find that it was renamed. So you need fix it your code or wait for them to fix it in new package.

https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.0/changelog/CHANGELOG.html

[1.0.0-preview.9] - 2018-06-06 Rename ARBackgroundRenderer to ARCameraBackground

Another soludion is to downgrade Unity to 2018 version. then you can import package with no problem.

it works for me at least.

adilaghayev commented 2 years ago

This is still broken in Unity 2020.3.18f

I don't really want to downgrade to 2018.

mattgoulet commented 2 years ago

Any update on this mapbox unity setup issue? It seems very consistent across multiple users.

brnkhy commented 2 years ago

Hey everyone, I'm sorry to say this but there'll probably won't be an AR fix/rework any time soon. So at the moment I can only suggest deleting all AR folders in the SDK and creating your own AR solution. I'll try to keep you updated if anything changes on AR front. :(

DishWasher1111 commented 2 years ago

Unity 2019.2.0 should work. You may have to play around with the settings: ARM64 vs. Universal, descriptions, etc.

marcosvvp commented 2 years ago

Just confirmed that the latest stable release (mapbox-unity-sdk_v2.1.1) is working on Unity 2018.4.36f1 (18 Jun, 2021).

Tested with Unity 2021.3.6f1 and 2019.4.40f1, and had no success importing the package.

For those that are just looking for a way to try out the package might be a workaround.

PS: Just landed here and have no idea how to update or change the code in order to work with newer Unity releases, which is why I tried these older ones.

juarezjl commented 2 years ago

Same problem here. any ideas how to make it work with the new releases of unity (ex 2022.1.11f1)?

davidsonclem commented 1 year ago

Same problem here. Any idea how it will work with newer 2022.1.11f1 or 2022.1.41f1 ?

devsleeper commented 1 year ago

2021.3.14f

samavan commented 1 year ago

Quick fix on my side :

  1. Be sure to enable the following packages : AR Foundation // ARCore XR Plugin
  2. Rename every ARBackgroundRenderer as ARCameraBackground and add the need reference.
  3. I believe you can remove every "m_BackgroundRenderer.camera = " cause that call is obselete. "Component.camera' is obsolete: 'Property camera has been deprecated. Use GetComponent() instead. (UnityUpgradable)'"
  4. I guess m_BackgroundRenderer.backgroundMaterial should be m_BackgroundRenderer.customMaterial insted.
  5. Commented a few more lines related to the *.mode which I didn't find a solution yet...

Here are the 4 files to replaces. Didn't try the AR yet if still working... At least the plugin isn't reporting error anymore. mapbox_2021.3.10f1-fix.unitypackage.zip