Last active
June 7, 2019 12:40
-
-
Save arkms/490f400758ef262f7b864079ec311ba2 to your computer and use it in GitHub Desktop.
Add to Unity the possibility to PLAY with just F6 and PAUSA with F7. Just download the script and put inside the "Editor" folder.
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
namespace Arj2D | |
{ | |
public class ShortCutKeys | |
{ | |
private const string MENU_EXTRA_RUN = "Edit/Extra/Run _F6"; | |
private const string MENU_EXTRA_PAUSE = "Edit/Extra/Run _F7"; | |
[MenuItem(MENU_EXTRA_RUN)] | |
private static void Run() | |
{ | |
EditorApplication.isPlaying = true; | |
} | |
[MenuItem(MENU_EXTRA_RUN, true)] | |
private static bool CanRun() | |
{ | |
return !EditorApplication.isPlaying; | |
} | |
[MenuItem(MENU_EXTRA_PAUSE)] | |
private static void Pause() | |
{ | |
EditorApplication.isPaused = !EditorApplication.isPaused; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment