Created
February 5, 2017 17:36
-
-
Save xenophy/d17f3922448fe0c4c23734d29a7d5a8e to your computer and use it in GitHub Desktop.
Unity Project Setup .gitignore and Asset directories.
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
#!/bin/sh | |
function setup() { | |
dirs=() | |
dirs=("${dirs[@]}" "Scenes") | |
dirs=("${dirs[@]}" "Prefabs") | |
dirs=("${dirs[@]}" "Scripts") | |
dirs=("${dirs[@]}" "Animations") | |
dirs=("${dirs[@]}" "Materials") | |
dirs=("${dirs[@]}" "Physics Materials") | |
dirs=("${dirs[@]}" "Fonts") | |
dirs=("${dirs[@]}" "Textures") | |
dirs=("${dirs[@]}" "Audio") | |
dirs=("${dirs[@]}" "Resources") | |
dirs=("${dirs[@]}" "Editor") | |
dirs=("${dirs[@]}" "Plugins") | |
for var in "${dirs[@]}"; do | |
mkdir Assets/"$var" | |
done | |
cat << EOT > .gitignore | |
/[Ll]ibrary/ | |
/[Tt]emp/ | |
/[Oo]bj/ | |
/[Bb]uild/ | |
/[Bb]uilds/ | |
/Assets/AssetStoreTools* | |
# Autogenerated VS/MD solution and project files | |
ExportedObj/ | |
*.csproj | |
*.unityproj | |
*.sln | |
*.suo | |
*.tmp | |
*.user | |
*.userprefs | |
*.pidb | |
*.booproj | |
*.svd | |
# Unity3D generated meta files | |
*.pidb.meta | |
# Unity3D Generated File On Crash Reports | |
sysinfo.txt | |
# Builds | |
*.apk | |
*.unitypackage | |
EOT | |
} | |
if [ -e Assets ]; then | |
echo "Setup .gitignore and Asset directories." | |
setup | |
echo "done." | |
echo "" | |
echo "You should setup manually folloing steps." | |
echo "" | |
echo "1. Open Inspector [Edit] -> [Project Settings] -> [Editor]" | |
echo "2. [Version Control] Mode to [Visible Meta Files]" | |
echo "3. [Asset Serialization] Mode to [Force Text]" | |
echo "" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should change directory to Unity Project directory, after that you just run following command.