Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Do all projects need to keep a full copy of every package in their Library Folder?

Discussion in 'Package Manager' started by pastaluego, Jan 28, 2022.

  1. pastaluego

    pastaluego

    Joined:
    Mar 30, 2017
    Posts:
    196
    Is there a way for projects to share from the same local package using manifest.json, packages-lock.json, or something else instead of needing to generate each package in its entirety in each individual project's Library folder?

    I noticed that every time I make a new URP project it generates the entirety of the burst package in its Library folder. Given that the Burst package is 750MB, it makes every empty new URP project I make take up upwards of 1.3GB of disk space.

    I often use an empty project to test mechanics or features in isolation, and this makes it so that gets out of control in terms of disk space.

    Before the package manager an empty Unity project never really exceeded 100MB, so to go from that to 1.3GB per empty project is a bit extreme.
     
  2. No.
    You can try to move your package into the Packages folder, copy this folder to somewhere on your disk (Unity needs to be shut down at this point), delete the Packages folder and make a symlink or junction (depending on what operating system you're using) named Packages and pointing to the folder you copied them to. You can replace the Packages folder in each project.
    Then you just drop the whatever packages you want into that folder. Although you lose the convenience to update your packages (it needs to be done in a normal project).

    I do not recommend this though, Unity's project size is reasonable comparing to other 3D software sizes.
    Buy a bigger disk, storage is dirt cheap. Preferably SSD so you don't wait for disk I/O too much.
     
  3. Tensor2

    Tensor2

    Joined:
    Sep 13, 2015
    Posts:
    12
    My project has about 150gb of actual files (mostly just music). The library folder is 1.7 TB. A bigger SSD will run me $500. Unity's library folder garbage can go to hell. Ignoring it is not a valid option.