Skip to content

Instantly share code, notes, and snippets.

@Josef212
Created January 27, 2020 13:43
Show Gist options
  • Save Josef212/0bd2a2ae15f1690d30f068cb731a8e38 to your computer and use it in GitHub Desktop.
Save Josef212/0bd2a2ae15f1690d30f068cb731a8e38 to your computer and use it in GitHub Desktop.
using UnityEditor;
public static class CompileAndRun
{
// % Ctrl/Cmd - # Shift - & Alt
[MenuItem("Tools/ReimportAndPlay %&r")] // Ctrl + Alt + R
public static void ReimportAndPlay()
{
AssetDatabase.Refresh();
EditorApplication.EnterPlaymode();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment