Created
January 22, 2019 09:12
-
-
Save daltonbr/23a2410b2a8fcd39d759c56d1fc8965d to your computer and use it in GitHub Desktop.
A bash script to switch Unity builds, this one is for OSX
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/bash | |
# https://bonusxp.com/2014/09/fast-platform-switching-in-unity3d/ | |
# $ brew install pidof | |
# $ chmod +x osxswitchplatform.bash | |
# ./osxswitchplatform ios | |
# ./osxswitchplatform android | |
# Make sure Unity isn't running while we switch directories out from under it. | |
if [ "$(pidof Unity)" ]; then | |
echo "Please quit Unity first" | |
exit | |
fi | |
# Make sure there is no Library directory. | |
rm -rf Library | |
# Link Library to platform directory | |
PLATFORM_DIR="${1}Library" | |
if [ ! -d $PLATFORM_DIR ]; then | |
mkdir $PLATFORM_DIR | |
fi | |
ln -s $PLATFORM_DIR Library |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment