Last active
August 29, 2015 14:00
-
-
Save jaywick/11083565 to your computer and use it in GitHub Desktop.
Launch Unity from Visual Studio
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
IfWinExist, ahk_class UnityContainerWndClass | |
{ | |
WinActivate | |
Send ^p ; sends Ctrl+P | |
} | |
else | |
{ | |
MsgBox, 64, Unity is not open. Please open the project to run from Visual Studio. | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Windows.Forms; | |
namespace UnityRunSwitcher | |
{ | |
static class Program | |
{ | |
/// <summary> | |
/// The main entry point for the application. | |
/// </summary> | |
[STAThread] | |
static void Main() | |
{ | |
Application.EnableVisualStyles(); | |
Application.SetCompatibleTextRenderingDefault(false); | |
System.Diagnostics.Process.Start("launch-unity.ahk"); // new | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Blog post: http://jay-wick.com/2014/04/start-playing-unity-project-from-visual_19.html
Known issues: won't open the same solution from Unity since SLN is different :(