Search Unity

UPM automatically adding packages

Discussion in 'Package Manager' started by Martin_Gonzalez, Jan 27, 2021.

  1. Martin_Gonzalez

    Martin_Gonzalez

    Joined:
    Mar 25, 2012
    Posts:
    361
    Hi!

    I have a CI environment and I need Unity UPM NOT to add packages automatically. To be specific, is adding automatically, without me wanting, com.unity.ads package. This is giving me duplicated classes error.

    This happens even if I remove it from package manager window, somehow if its a clean installation of the project it adds it.

    How can tell unity to not do that?

    * I don't have com.unity.ads in manifest.json
    * I have packgae-lock.json in my version control without com.unity.ads

    The following packages were added:
    com.unity.ads@3.5.2
    The following packages were updated:
    com.unity.test-framework from version 1.1.18 to 1.1.19
    com.unity.xr.legacyinputhelpers from version 2.1.4 to 2.1.6

    Documentation says

    ```
    Package Manager only installs packages that are explicitly included as a dependency in your project, so once you remove that entry, Package Manager ignores the package and doesn’t install it.
    ```
     
    Last edited: Jan 28, 2021
  2. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    151
    Hi @Martin_Gonzalez,

    These are known as default packages. There is an undocumented flag you can start the editor with
    -upmNoDefaultPackages
    that disables this feature. Hope this helps!
     
    JoNax97 likes this.