Skip to content

Instantly share code, notes, and snippets.

@jaywick
Last active August 29, 2015 14:00
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 jaywick/11083565 to your computer and use it in GitHub Desktop.
Save jaywick/11083565 to your computer and use it in GitHub Desktop.
Launch Unity from Visual Studio
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.
}
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
}
}
}
@jaywick
Copy link
Author

jaywick commented Apr 22, 2014

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 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment