Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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
}
}
}
Owner

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