unity编译时自动结束项目运行

public class AutoStopHelper : EditorWindow {
[MenuItem(“Tools/Auto Stop When Compiling”)]
public static void Init(){
GetWindow();
}
string tips = “Not compile yet”;
void OnGUI()
{
GUILayout.Label(tips);
}
void Update()
{
if(EditorApplication.isCompiling && EditorApplication.isPlaying)
{
tips = string.Format(“Auto exit play mode when compiling at {0}”, System.DateTime.Now);
EditorApplication.isPlaying = false;
}
}
}

你可能感兴趣的:(unity学习笔记)