Search Unity

[feature request] Symbolic link support for package manager

Discussion in 'Package Manager' started by xlemaitre-poc, May 15, 2019.

  1. xlemaitre-poc


    Mar 10, 2016

    Would it be possible to add (Windows) symbolic link support for the package manager on the "Packages" directory or at least on the "manifest.json" file ?

    We are working on multiplayer Unity projects and it has been proven to be efficient to clone our Unity projects by using symbolic link feature for multiplayer debugging with 2 Unity Editor instances running on the same project (in 2 different directories) or even to be able to work on 2 different plateforms using the same base code.

    We used to create symbolic links on "Assets" & "ProjectSettings" folders only, but since the use of the packages we have to copy the Packages directory and its manifest.json file into the directory of the clone project.

    Code (output):
    1. Directory of "Project"
    2. <DIR>          .
    3. <DIR>          ..
    4. <DIR>          Assets
    5. <DIR>          Library
    6. <DIR>          Packages
    7. <DIR>          ProjectSettings
    9. Directory of "ProjectClone"
    10. <DIR>          .
    11. <DIR>          ..
    12. <SYMLINKD>     Assets [..\Project\Assets]
    13. <DIR>          Packages
    14. <SYMLINKD>     ProjectSettings [..\Project\ProjectSettings]

    We would love to only have to create another symbolic link to the "Packages" directory instead. For now it's not working and the Package Manager blocks the loading of the project because it cannot detect the files needed through the symbolic link.

  2. mathieur


    Unity Technologies

    Jul 22, 2015
    I believe this is because on windows symlink will act as a file. So what you would need would be a junction, which you can create using mklink /J Packages PackagesXYZ, for example. I just tried it locally and it seems to work for what you are trying to do.
    xlemaitre-poc and SugoiDev like this.
  3. xlemaitre-poc


    Mar 10, 2016
    Ok thanks!

    Working fine for us. I'm just a little bit perplex on why the Package Manager is not supporting the same filesystem features than Unity Editor as it's working fine with classic symlink on folders "Assets" & "Packages", so i would maintain my feature request ;)

    And we still have to try if Package Manager can work with hardlink on MacOSX ( ) as we are using a Mac as a build machine with the same project cloning mechanism. If you already have a clue, please share ;)