Created
January 10, 2017 19:47
-
-
Save foriequal0/1397c9e35ed4b520630ae38abd0d5db4 to your computer and use it in GitHub Desktop.
Unity VSCode Launcher
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
#!/usr/bin/env bash | |
# Install VSCode, and add to 'PATH' | |
# Save this script as code_launcher or something other than 'code' | |
# Goto 'Unity Preference' -> 'External Tools' | |
# Set 'External Script Editor' as that code_launcher | |
# Set 'External Script Editor Args' as '$(File);$(Line);$(ProjectPath)' (without quote) | |
IFS=';' read -ra ARG <<< "$@" | |
FILE=${ARG[0]} | |
LINE=${ARG[1]} | |
PROJ_PATH=${ARG[2]} | |
if [[ -z "$FILE" ]]; then | |
code -r "$PROJ_PATH"; | |
else | |
code -r --goto "$PROJ_PATH" "$FILE:$LINE"; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment