Search Unity

Configure Unity Package Manager global cache location

Discussion in 'Package Manager' started by okcompute_unity, Mar 25, 2019.

  1. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    574
    Last edited: Apr 16, 2019
    codestage likes this.
  2. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    50
    Where do I set these?
     
  3. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    574
    @Nyanpas, these are environment variables. Please refer to your OS documentation.
     
  4. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    50
    Oh, I am stupid. Thank you. :3c
     
  5. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    2,426
    Not much helpful.

    I followed this tutorial here in order to change the location of the npm and packages folders.

    To do that (Windows 7 SP1 for me but I suspect that the process is about the same for W8 and W10):
    1. create two new variables in "Environment Variables/System Variables" (do not modify any existing variable as mentioned in the tutorial!!!),
    2. affect them the path where you want them to be stored. You do not need to create the directories, just enter the new path and Unity will create them,
    3. if necessary, quit the hub entirely from the system tray and Unity,
    4. restart the Hub and Unity and let Unity rebuild the cache.
    Once done:
    • delete the npm and packages folders in "C:\Users\Username\AppData\Local\Unity\cache",
    • start your projects and make sure all the packages you are using are there.
    Here are the new variables I created; everything went fine.

    Capture_3.JPG

    Capture_4.JPG
     
    Nyanpas likes this.