Last active
June 9, 2018 12:59
-
-
Save andybak/e10ea47d253391de8eceb3393d2eb142 to your computer and use it in GitHub Desktop.
Neater Unity 2018 projects with git submodules and sparse checkout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage | |
# addpackage [repo url] [package directory name] [Assets dirs to include] | |
# Example: ./addpackage.sh https://github.com/georgejecook/UnityTimelineEvents.git UnityTimelineEvents "TimelineEvents/*" | |
git clone --depth=1 --no-checkout $1 Packages/$2/repo | |
git submodule add $1 Packages/$2/repo | |
git -C Packages/$2/repo/ config core.sparseCheckout true | |
git submodule absorbgitdirs | |
echo Assets/$3 >> .git/modules/Packages/$2/repo/info/sparse-checkout | |
git submodule update --init --force --checkout Packages/$2/repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "com.ixxy.unitytimelineevents", | |
"displayName": "Unity Timeline Events", | |
"version": "0.0.1", | |
"unity": "2018.1", | |
"description": "test", | |
"dependencies": { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment