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

来源:互联网 发布:2015十大网络流行语 编辑:程序博客网 时间:2024/06/10 14:43

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;
}
}
}

0 0
原创粉丝点击