码迷,mamicode.com
首页 > 编程语言 > 详细

unity3d 日志捕捉

时间:2014-10-28 19:58:35      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:style   blog   io   color   sp   div   on   log   bs   

public class Test : MonoBehaviour
{
    public string output = "";
    public string stack = "";
    void OnEnable()
    {
        Application.RegisterLogCallback(HandleLog);
    }
    void OnDisable()
    {
        Application.RegisterLogCallback(null);
    }
    void HandleLog(string logString, string stackTrace, LogType type)
    {
        output = logString;
        stack = stackTrace;
    }
}

 

unity3d 日志捕捉

标签:style   blog   io   color   sp   div   on   log   bs   

原文地址:http://www.cnblogs.com/123ing/p/4057506.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!