Created
August 28, 2018 01:03
-
-
Save sassembla/8a269be93917d28fe488e3632e599c5e to your computer and use it in GitHub Desktop.
UnityEditorでPlay中にコンパイルが走った時にコンパイル直後にPlayを停めてくれるやつ
This file contains hidden or 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 UnityEditor; | |
using UnityEngine; | |
public class StopAfterCompileProcess | |
{ | |
[UnityEditor.Callbacks.DidReloadScripts] | |
public static void StopAfterCompile() | |
{ | |
if (EditorApplication.isPlaying) | |
{ | |
Debug.Log("stop play by StopAfterCompile"); | |
EditorApplication.isPlaying = false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment