Search Unity

Resolved Installation issue: Failed to generated ARCore reference image library 'ReferenceMarkers_arf'

Discussion in 'Unity MARS' started by osimaleki, Mar 2, 2021.

  1. osimaleki

    osimaleki

    Joined:
    Jan 15, 2020
    Posts:
    35
    Hi,

    I just installed the package on a project that was already using AR Foundation. I cannot build anymore as I run into this problem.

    The execution of below in file "ARCoreBuildProcessor.cs" results in an error "C:/Users/User.imgdb: Failed to open file." that ends up in throwing an exception.

    var (stdOut, stdErr, _) = Cli.Execute(arcoreimgPath, new[]
    {
    "build-db",
    $"--input_image_list_path={inputImageListPath}",
    $"--output_db_path={outputDbPath}",
    });

    I tried running the arcoreimg.exe with the same parameters to see but could not reproduce. Any help is appreciated.

    Thank you!
    Hossein
     
  2. mtschoen

    mtschoen

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    194
  3. osimaleki

    osimaleki

    Joined:
    Jan 15, 2020
    Posts:
    35
    Thank you for the quick reply!

    I saw that bug reported but just now to test it before moving everything over, tried with a blank project and it worked fine. The project has spaces in the name and path.

    Stupid question for you as I am a beginner in Unity. If I fix this say in the C# file as I see a potential path problem, then would that work? Is that a thing where you can just update scripts of packages? Would it get overwritten?

    Again thank you for the quick help. I will try the path thing with my project tomorrow but in the meantime if you have any other suggestions, I'll take it
     
  4. mtschoen

    mtschoen

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    194
    Yep, you can update package scripts, and yep, they might get overwritten :)

    Unity stores a local copy of each package in the project in the `Library/PackageCache` folder. Sometimes when Unity resolves packages it will overwite these, so it is not "safe" to modify code in these packages. However, you can "embed" a package from this folder, either by copying the package into the `Packages` folder in the root of the project, or using the `Client.Embed` API in the package manager. You can read more here https://docs.unity3d.com/Manual/upm-embed.html

    I'm not sure if you can fix this build issue in C# code. I'm not entirely sure but I think the issue may be part of the AR Core SDK. I'd be curious to know if you find a fix!

    Hope this helps :)
     
  5. osimaleki

    osimaleki

    Joined:
    Jan 15, 2020
    Posts:
    35
    Yeah moving the directory fixed it. I guess this is a recurrence of an old bug. Thank you for the help @mtschoen