Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice
Unity's version control component has been upgraded to Plastic SCM.

Collaborate and Package Manager for local package

Discussion in 'Unity Collaborate' started by jorgeolothar, Feb 5, 2019.

  1. jorgeolothar

    jorgeolothar

    Joined:
    Mar 27, 2016
    Posts:
    25
    I have a variety of Unity projects that could benefit from creating local packages to share code, etc between them. I set up local packages in my main machine (PC1) and can share between local projects.

    The problem comes when I need other team members to see those files. I upload using Collaborate but files under /Packages seem to be ignored. The Packages/manifest.json file gets shared to another machine (PC2), but the local package points to the path of PC1, which does not exist in PC2, so I get a package import error.

    It would be great to have local packages have the option to be included in collaborate.
     
  2. dtakahas

    dtakahas

    Unity Technologies

    Joined:
    Oct 22, 2015
    Posts:
    83
    Local packages that you put in <project root>/Packages should get picked up if you are using Unity 2018.1 or later.

    I'm guessing you might be on 2017.x if the Packages folder is there, but it's not picked up. We may need to backport that change further if possible.
     
    noemis likes this.
  3. jorgeolothar

    jorgeolothar

    Joined:
    Mar 27, 2016
    Posts:
    25
    That's the issue, I want the local package outside <project_root> since it's shared on multiple projects.
     
  4. dtakahas

    dtakahas

    Unity Technologies

    Joined:
    Oct 22, 2015
    Posts:
    83
    Ahhh I see now. This is a little bit of a fuzzy line between Package Manager and Collab right now. I know there is discussion about allowing external dependencies in the package manifest: https://forum.unity.com/threads/git-support-on-package-manager.573673/

    We have some work in progress that will make it so that the solution in that thread could work with a Collab project too.
     
  5. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    this is working well now right? we are using unity 2019.4.10 and I want to move some 3d party assets to the package manager, I wouldn't have problems when syncing with Unity collab to my coworkers
     
  6. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @pistoleta, Collab does not sync folders inside of the Packages folder, but you can specify external packages in your manifest, which would then by synced by Collab. This works best if you have a Git repo with the assets that you would like to share with your teammates. There's a post by okcompute_unity in https://forum.unity.com/threads/git-support-on-package-manager.573673/ that details how to do that.
     
  7. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    Are you telling me Collab does not sync assets downloaded using the UPM ?
     
  8. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    If those assets are loaded into the Assets, ProjectSettings or are listed in the manifest.json of the Packages folder, then Collab will sync them. You can specify CustomPackages to use, but they need to be in the Assets folder for Collab to see them.
     
  9. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    536
    Okay then good, I added Firebase to the UPM registry and now it is in the manifest.json too so it's fine.

    I got scared there for a moment.
     
    Ryan-Unity likes this.