Unity3D 获得编辑器的Log信息

来源:互联网 发布:淘宝给商家结算的周期 编辑:程序博客网 时间:2024/06/06 05:41

1. 注册

Application.logMessageReceived += HandleLog;

2. 注销

Application.logMessageReceived -= HandleLog;


3. 实现函数

    void HandleLog(string condition, string stackTrace, LogType type)
    {
        if (type == LogType.Error
            || type == LogType.Warning
            || type == LogType.Exception)
        {
            xxxxx
        }
    }


0 0