Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

how do you use the package manager with git?

Discussion in '2020.2 Beta' started by laurentlavigne, Aug 1, 2020.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,579
    entering a url is abnormally slow so trying out tarball
    I download a tar.gz https://github.com/Unity-Technologies/Graphics/archive/v10.0.0-preview.26.tar.gz
    then
    upload_2020-7-31_17-52-53.png
    point to the tar.gz that was just downloaded
    and i'm getting this
    upload_2020-7-31_17-53-47.png
    which is odd because 2020.2 does recursive
    so i check the PM version but it won't show up in the PM search
    upload_2020-7-31_17-54-56.png
    maybe it's due to the errors gracing the console but i don't think so, PM should be working regardless (as in MUST, since it's essential to unity now that most things are packages)
    upload_2020-7-31_17-55-46.png
     

    Attached Files:

  2. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    443
    Did you try putting the package into the Packages folder of your project?

    - Assets
    - Builds
    - Library
    - Packages <--- Move tgz here
    - ProjectSettings

    When the package is there I believe it auto-adds, but if not add it again through the menu.

    If that doesn't work, you may want to have your git client that supports LFS to create a clone of the given branch to the Packages folder directly.
     
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,579
    I just tried that but it doesn't show up
    upload_2020-7-31_19-27-14.png
    that would have been nice but I understand why it isn't included: it would take a long time to startup the editor.
    tried your second suggestion and get nothing
    except that searching "core" now returns nothing which has been my experience with package manager breaking easily when there are compile errors
    (console after I + core, urp, vfx and shader graph separately)
    upload_2020-7-31_19-44-23.png
     
  4. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    1,742
    Why two threads? https://forum.unity.com/threads/a19-and-urp10.942783

    You can NOT use tarball or zip from github with Graphics repository. Graphics repo requires git LFS and just pulling archive will not give you any binary files. This will result in numerous errors.
     
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,579
    yes, I bypassed the dreadful git desktop, went command line following instructions on the github page and got it working
    besides going command line i think the trick was to import urp twice.
    thanks for the help
     
  6. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    772
    On a Mac I highly recommend Homebrew to install Git. But I think you’re on Windows?
     
  7. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,579
    Yes I am.
    It's ok, the command lines are on the github page, I just copy pastaed it, it's just that in some cases I use github desktop and it's worked.
     
  8. Lelepoop

    Lelepoop

    Joined:
    Nov 14, 2016
    Posts:
    126
    So using a url is slower than downloading/cloning the entire repo locally? what?
     
  9. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    1,742
    I feel there's always some overhead in using PM for this but for example I haven't managed to get PM do anything fast with multiple big git packages. In theory PM should be able to reuse the same repo when you have multiple paths with same repo but in my brief testing the import times were still awfully slow in comparison to just cloning the repo manually and then assigning the unity projects manifest the file refs that just point to the cloned repo paths (or simply copy over the packages into your packages folder).

    Worth noting here is that you simply can NOT download entire repo locally from github using the github's download option since Graphics repo uses git LFS and zip download would just not get any binary files. If this worked, it would be really snappy but now we have to clone the whole repo, which I believe is around 4GB of data. This will take a long time with git.
     
    Last edited: Aug 11, 2020
  10. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    39
  11. sendspace

    sendspace

    Joined:
    Jul 24, 2016
    Posts:
    39
    can you tell me whats the size of that tarball after download ?
     
  12. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,579
unityunity