Skip to content

Instantly share code, notes, and snippets.

@talecrafter
Created March 5, 2014 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talecrafter/9366784 to your computer and use it in GitHub Desktop.
Save talecrafter/9366784 to your computer and use it in GitHub Desktop.
Windows batch file that opens Unity project and C# solution
@echo off
:: find first filename with *csharp.sln
FOR %%F IN (*csharp.sln) DO (
set filename=%%F
goto filenamefound
)
:: no csharp solution found, skip to opening unity
goto openunity
:filenamefound
echo "%filename%"
:: opens csharp solution with standard program
start %filename%
:openunity
:: opens Unity Editor with the project in this path
start D:\Development\Unity\Editor\Unity.exe -projectPath %~dp0
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment