Skip to content

Instantly share code, notes, and snippets.

@adrianogil
Last active October 4, 2017 21:51
Show Gist options
  • Save adrianogil/fdf5a0b93b79f59f6fa1d7869c50631c to your computer and use it in GitHub Desktop.
Save adrianogil/fdf5a0b93b79f59f6fa1d7869c50631c to your computer and use it in GitHub Desktop.
Dynamic Unity alias for all installed versions
# Dynamic Unity versions alias
for file in /Applications/Unity*/ ; do
if [[ -d "$file" && ! -L "$file" ]]; then
base_file=`basename $file`
base_file=${base_file:5}
# echo "$base_file is a directory";
alias open-unity-${base_file}="${file}/Unity${base_file}.app/Contents/MacOS/Unity -projectPath \$PWD"
fi;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment