Search Unity

PackageManager throws dozens of Errors

Discussion in 'Package Manager' started by BTStone, Nov 28, 2019.

  1. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,084
    Installed Unity 2019.3.0f1 (RC) today, installing some plugins from the asset store to check compatibility. After installing a plugin (Quantum Console) I then get tons of errors from the Packagemanager.
    First thing I did deleting that plugin. Didn't help.
    Restarted Unity. Didn't help.
    Closed Unity and deleted the Library folder. Didn't help.

    Had a closer look at the errors, one of them like this:

    Library\PackageCache\com.unity.package-manager-ui@2.0.3\Editor\Sources\UI\Common\UIUtils.cs(1,32): error CS0234: The type or namespace name 'UIElements' does not exist in the namespace 'UnityEngine.Experimental' (are you missing an assembly reference?)

    Thought "Hm, UIElements?" - installed the UI Builder preview package. Didn't help.

    Deleted ALL previous imported plugins. Closed Unity. Deleted Librarby Folder again. Unity reimports. Didn't help, tons of errors still showing.

    Looked closer into the errors again. Since it came from the PackageManager UI package I removed this package. Helped. All errors gone. But...how can install this package again. Afaik this package is needed to display the actual Package Manager but...I still can access the Package manager window, remove/install packages.

    So I'm a bit confused.
    Why did the Package Manager throw all these errors all of a sudden?
    How can I install the Package Manager UI Package after removing it, it doesn't show up as a package?
    Why am I still able to access the Packager Manager without the respective UI Package?
     
  2. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,084
    Alright, checked it: it's linked to the Quantum Console plugin, happens too in an empty project when I only import that plugin, contacting asset dev.
     
  3. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,487
    The new asset store tools allows us to select whether we want package references to be included when uploading our package; I enabled this so that users automatically got TMP installed when they install QC

    So it's possible that either
    A) I have set up something wrong with this
    B) this new process is broken or designed incorrectly

    For now, I believe that you get given the option when installing to skip the packages. Go with that and make sure you install TMP yourself (and unity UI if you're not using that)

    Sorry that this happened and thanks for letting me know. I'll investigate it and see who the problem lies with
     
  4. YondernautsGames

    YondernautsGames

    Joined:
    Nov 24, 2014
    Posts:
    135
    @QFSW, what version of the ui elements package were you using? It's quite possible that the new asset tools either aren't specifying the version and just using the latest, or that if they detect the latest already installed then they think that's ok.

    The error mentioning the "UnityEngine.Experimental" namespace is sometimes because code is moved out of there in newer versions of a package. It looks like they have 2.0.3 installed.
     
  5. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,487
    As far as I'm aware: none, I wasn't using UI Elements at all. I uploaded the package in 2018.3, but I know that Unity has a tendency to add in random packages behind your back. The only package QC really depended on was TMP and Unity UI
     
  6. cassandraL

    cassandraL

    Unity Technologies

    Joined:
    Dec 7, 2017
    Posts:
    108
    Hello @QFSW and @BTStone,
    The issue you are experiencing is because the Package Manager Window was a package in 2018 and 2019.1. It was moved back to the editor in 2019.2 because it was disappearing when users had compilation issues. So while we are waiting for that fix, the Package Manager Window is no longer a package.

    Therefore, the issue you see is that if you open Unity 2019.2+ with that asset, the asset will try to import that package, which can cause name collision and other issues.
    @QFSW The best would be for the Quantum Console plugin to be able to say "Import package manager in 2018.4 and 2019.1, but not in 2019.2+".
    @BTStone As for your projects using that plugin, you did the right thing by removing the Package Manager package using the Package Manager window.
     
    BTStone likes this.
  7. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,487
    Thanks for the help

    Afaik, the new asset store tools do not support this. For now I am not using the new package dependency feature until I'm certain it wont cause any issues. @AndrewAssetStore, any input?