Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved AR core does not work with barracuda

Discussion in 'AR' started by GamerLordMat, Jun 18, 2022.

  1. GamerLordMat

    GamerLordMat

    Joined:
    Oct 10, 2019
    Posts:
    177
    Hello,

    when using Ml agents and AR Code I get the Error, Unity Version 2021.3.3f1 LTS:

    Multiple precompiled assemblies with the same name Google.Protobuf.dll included on the current platform. Only one assembly with the same name is allowed per platform. (.../Library/PackageCache/com.unity.barracuda@2.0.0/Barracuda/Runtime/Plugins/ProtoBuffer/Google.Protobuf.dll)

    Multiple precompiled assemblies with the same name Google.Protobuf.dll included on the current platform. Only one assembly with the same name is allowed per platform. (.../Library/PackageCache/com.google.ar.core.arfoundation.extensions@b9496c2059/Editor/Scripts/Internal/Analytics/Google.Protobuf.dll)

    any ideas how to resolve that?

    Best
     
  2. davidmo_unity

    davidmo_unity

    Unity Technologies

    Joined:
    Jun 18, 2019
    Posts:
    99
    The AR Core Extensions package is owned and managed by Google; unfortunately it seems like Unity Barracuda is currently incompatible with it.
     
    GamerLordMat likes this.
  3. fguinier

    fguinier

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    146
    Hi @GamerLordMat as @davidmo_unity said we don't have a good solution at the moment. The problem being that both package provide there own version of protobuf and as you state this collide. A work around would be to grab the AR foundation package from source and remove the protobuf dll from it, it will then use the one provided by Barracuda. Do do that:

    * Clone or download https://github.com/google-ar/arcore-unity-extensions (i'm assuming you use AR foundation as AR core is deprecated on your version of Unity).
    * edit your project manifest (Package/manifest.json) and change the following line:
    "com.google.ar.core.arfoundation.extensions": "https://github.com/google-ar/arcore-unity-extensions.git",
    to
    "com.google.ar.core.arfoundation.extensions": "file:<path_to_ARFoundationExtension_Clone>",
    * remove <path_to_ARFoundationExtension_Clone>\Editor\Scripts\Internal\Analytics\Google.Protobuf.dll

    I hope it helps!
    Florent
     
    GamerLordMat likes this.
  4. GamerLordMat

    GamerLordMat

    Joined:
    Oct 10, 2019
    Posts:
    177
    Hello Florent,

    thank you for your respons.
    Your solution solved it, atleast I have no use for protobuf in my project.

    It is a pitty that their are basically no AR-kits in active development anymore, it seems

    With kind regards,

    Matthew