Search Unity

Symbolic Link Support

Discussion in 'Unity Build Automation' started by DreadTalon, Aug 11, 2015.

  1. DreadTalon

    DreadTalon

    Joined:
    Jan 8, 2013
    Posts:
    5
    My Git repository contains a submodule named AssetsRepo which I use to version some contents of the Unity Assets folder. The concept is that this repo contains large binaries which may have their history cleaned occasionally to reduce bloat and stay under the 1GB limit for the time being. The code history and project settings are stored in the parent repo.

    Due to Unity's system folders, such as Resources, it is not possible to simply use one submodule as a directory within the Assets directory. I want to store stuff from inside Resources, Editor and Standard Assets inside the AssetsRepo and I may also want to store fully versioned text files in Resources.

    My solution to this is to store the AssetsRepo submodule in the main directory, it contains a separate folder for Resources, Editor, Assets and Standard Assets. Each of these folders can then be symlinked into the Unity Assets directories.

    This approach seems to work fine for normal development but I have run into a problem committing the windows junctions in Git.

    Would UCB recognize windows junctions if I was able to commit them?

    What other alternatives exist to make this possible?

    One possible solution would be to create a batch script which generates the junctions and have it run as a custom pre-build step, but I have no idea what file system permissions are available or even what operating system is doing the builds.