码迷,mamicode.com
首页 > 移动开发 > 详细

手机打包Debug显示

时间:2017-08-07 15:15:48      阅读:201      评论:0      收藏:0      [点我收藏+]

标签:ldd   trace   device   堆栈   intern   错误类型   pre   collect   cti   

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DeviceBuildDisplay : MonoBehaviour {

    internal void OnEnable()
    {
        Application.logMessageReceived+=HandleLog;
    }
    internal void OnDisable()
    {
        Application.logMessageReceived += null;
    }
    private string m_logs;
    /// <summary>
    /// 
    /// /// </summary>    
    /// /// <param name="logString">错误信息</param>    /// 
    /// <param name="stackTrace">跟踪堆栈</param>    /// 
    /// <param name="type">错误类型</param>    
    void HandleLog(string logString, string stackTrace, LogType type)
    {
        m_logs += logString + "\n";
    }
    public bool Log;
    private Vector2 m_scroll;
    internal void OnGUI()
    {
        if (!Log)
            return;
        m_scroll = GUILayout.BeginScrollView(m_scroll);
        GUILayout.Label(m_logs);
        GUILayout.EndScrollView();
    }
}

 

手机打包Debug显示

标签:ldd   trace   device   堆栈   intern   错误类型   pre   collect   cti   

原文地址:http://www.cnblogs.com/JimmyCode/p/7298981.html

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