Search Unity

Can I configure the location of the packages cache?

Discussion in 'Package Manager' started by JimmyCushnie, May 6, 2018.

  1. JimmyCushnie

    JimmyCushnie

    Joined:
    Jun 7, 2017
    Posts:
    65
    Is there any way to configure where packages are downloaded to and stored?
     
    WolfDreamer and Noisecrime like this.
  2. DanielTG

    DanielTG

    Unity Technologies

    Joined:
    Feb 15, 2018
    Posts:
    90
    Hi Iamsodarncool,

    Thanks for the feedback. Unfortunately we don't currently support the option to change the default package cache on your system but I'll take note of the request and see what we can do for a future release.

    Please keep the feedback coming.

    Thanks,
    Daniel
     
    Noisecrime and JimmyCushnie like this.
  3. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    1,512
    Please make this a priority. Ever since the introduction of the AssetStore developers have been requesting the ability to specify the location of asset package downloads to no avail. Personally I despise that assets ( data ) are 'polluting' my C drive, especially as its only a 256Mb SSD where the cost of space is at a premium. I already have over 4GB of asset store packages and no doubt the new package cache itself will soon balloon in file size too. Being able to specify it use a location on my 2TB other drive would be so much better.

    Also in terms of features i'm wondering if a nice inbuilt back up system would be beneficial. I already make back ups of asset store packages by hand, and just completing an editor tool to do this automatically. Simple reason being that internet connection is not a given, even in the UK periodically I lose internet in off hours while the ISP does updates or housekeeping. In addition as much of my client work involves installing on-site and sometimes needing to make updates, having local back ups of older versions would be a nice safety net.
     
  4. DanielTG

    DanielTG

    Unity Technologies

    Joined:
    Feb 15, 2018
    Posts:
    90
    @Noisecrime
    Thanks for the feedback as well. Re: Customizing the package cache location. In the short term, it will hopefully not be a major issue even with a small local HD since the number of new ackages and overall size is relatively small. However, yes it's definitely an important point for us to address moving forward as we onboard more packages internally and from 3rd parties.

    Re: backup system. It's noted and I'll review with the team. Are you looking for something along the lines of a "Project" backup/archive or more system wide in terms of Packages?

    Thanks
    Daniel
     
    Noisecrime and JimmyCushnie like this.
  5. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    1,512
    I think more global in nature, just so you can easily have backup of packages to take onsite, or be able revert to earlier versions etc. Again most beneficial when the internet might be unavailable, or as is often the case onsite can be intermittent or low bandwidth.

    thanks.
     
  6. Gru

    Gru

    Joined:
    Dec 23, 2012
    Posts:
    138
    Just found this as I was about to post the same request.
    I think it is important to have a setting for where things are installed and downloaded. It especially applies for users with SSDs. This includes:
    • Asset Store Local Packages: most people don't want that on C:, since some packages are huge (I've downloaded several GB in size) and it is not clear if these folders are safe to delete. Unity should consider a UI window for this, with the ability ton change the path and delete the cached packages from the UI.
    • GI Cache.
    • Package Manager packages. With multiple versions and 3rd party packages this will become important too, since we can't actually erase those like we could with Asset Store Packages Cache now.
    • Place where new Unity Versions are installed with Unity Hub. Some versions we want in the default (preferred) path, presumably on C:, and some we don't. So, for example in my case, main project Unity version will go on C:, betas and legacy support versions will not. One solution would be to offer a list of install locations defined by the user, and for every new installation if there is more than one install location defined we should pick which one we want for this specific version. As it is today, it is actually more convenient to not use Unity Hub, since we can at least manually choose where things are installed.
     
    Noisecrime and JimmyCushnie like this.
  7. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    2,960
    I usually solve this with symlinks. Occasionally an app may have really terrible symlink support and screw everything up, but that’s pretty rare on macOS and Linux.
     
  8. WarpforgedGames

    WarpforgedGames

    Joined:
    Dec 13, 2017
    Posts:
    1
    Moreover, this violates a software development tenet: Ideally, all code dependencies (with possible exception of platform/sdks) reside under source control for a given project. It is often the case that third party code is modified/fixed. It's ok to have a (optional) cache in the User's profile folder, but packages referenced by projects need to live under the project folder or at the least, we need an option to reference/download them there. If this isn't already implemented, please prioritize.

    - appreciated
     
    bgrz, Noisecrime and JimmyCushnie like this.
  9. Paul_Bronowski

    Paul_Bronowski

    Joined:
    Sep 3, 2014
    Posts:
    53
    FWIW, SymLinks(Junctions, reparse points, etc.) can burn you. In particular, the new (forced) Windows Feature Pack updates are not simple in-place patches. They are clean Windows installations with user migration. Problem is that they often won't respect your junctions, particularly in Program Files and Program Files (x86) and other 'system' folders. Your content might be orphaned and junction obliterated, or Windows setup could fail completely (over and over and over and over). The constrained SSD C: problem is something the Windows and Visual Studio groups are aware of and they are taking some steps to try to change things, but it's not easy. So, be aware and careful if redirecting special system folders.
     
    Noisecrime likes this.
  10. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    2,960
    Maybe that's a problem unique to Windows. The other platforms supported by Unity treat symlinks as whatever they're pointing to.
     
  11. Paul_Bronowski

    Paul_Bronowski

    Joined:
    Sep 3, 2014
    Posts:
    53
    It's not a problem with reparse point implementation on Windows. It functions similarly to other OS'es in that respect. Windows setup, during major feature upgrade (with user migration) deletes them and re-creates them as simple directories, because it is not checking if they are reparse points and doesn't re-create them as such.
     
  12. zetaFairlight

    zetaFairlight

    Joined:
    Apr 26, 2018
    Posts:
    10
    It's the one and only reason we don't buy Unity... not even a safe workaround.
     
  13. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    154
    > In the short term, it will hopefully not be a major issue even with a small local HD since the number of new ackages and overall size is relatively small.

    I've just checked and the cache directory was 2.5Gb

    May I suggest this is now a high priority?
     
    alexzzzz and JimmyCushnie like this.
  14. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,404
    Mine is ~1Gb right now but I clear it up from time to time. My SSD is 128Gb, and there's usually only about 10Gb of free space available.
     
  15. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    572
    andybak likes this.