Search Unity

Resolved Lazy<T> error

Discussion in 'AR' started by User340, Sep 21, 2020.

  1. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Library/PackageCache/com.unity.xr.management@3.2.13/Editor/Metadata/KnownPackages.cs(34,24): error CS0433: The type 'Lazy<T>' exists in both 'System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

    Anyone run into this before? How to fix?
     
  2. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    The error appears when I import the ARKit XR Plugin. Screen Shot 2020-09-21 at 7.39.34 PM.png
     
  3. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    Does this happen in a clean, new project? What version of Unity are you using? What other assets or packages do you have installed (Maybe change Unity Registry to In Project in the Pack Man UI and paste another screen shot)?

    For context, I tried adding AR Foundation and AR Kit XR Plugin (same versions as above) to a new project in Unity 2019.4.10f1 and I don't see this error.
     
  4. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Unity Version: 2019.4.10f1.
    It does not happen in an empty project.

    Here's the screenshot with "In Project" selected.
    Screen Shot 2020-09-22 at 8.39.10 PM.png
     
    Last edited: Sep 23, 2020
  5. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    upload_2020-9-23_9-8-28.png

    Here's mine and I get no errors. Other than version differences (seems some of the packages you have installed currently are older) the only thing different is the Build Report Inspector, which doesn't seem to be a current Unity provided package and not in the set I can install by default.

    At this point it's either that package or it's something in your project itself. I would suggest starting from a clean, new project with all the packages here installed then start adding stuff back in till you get to the break.
     
  6. awkwardstreamer

    awkwardstreamer

    Joined:
    Apr 21, 2020
    Posts:
    4
    i Know this was a couple months ago but im using 2019.3.15 , my project was perfectly fine making a VR game then i decided to give Bolt a try and now i cant get rid of this damn error. I have no idea but it seems like theres multiple scripts using the same Lazy<T> I know bolt came out in July so i thought it might be possible it could be indirectly connected to what were experiencing. Im like Noobin to the max over here so i dunno but i wanted to share that it happened for me immediately after installing Bolt
     
  7. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Turns out I had a DLL imported into my Assets folder called "System.Threading". Deleting it resolved the issue.