using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
public class logdata
{
public string output = "";
public string stack = "";
public static logdata Init(string o, string s)
{
logdata log = new logdata();
log.output = o;
log.stack = s;
return log;
}
public void Show(/*bool showstack*/)
{
GUILayout.Label(output);
//if (showstack)
GUILayout.Label(stack);
}
}
/// <summary>
/// 手机调试脚本
/// 本脚本挂在一个空对象或转换场景时不删除的对象即可
/// 错误和异常输出日记路径 Application.persistentDataPath
/// </summary>
public class DeBug_Test : MonoBehaviour
{
List<logdata> logDatas = new List<logdata>();//log链表
List<logdata> errorDatas = new List<logdata>();//错误和异常链表
List<logdata> warningDatas = new List<logdata>();//警告链表
static List<string> mWriteTxt = new List<string>();
Vector2 uiLog;
Vector2 uiError;
Vector2 uiWarning;
bool open = false;
bool showLog = false;
bool showError = false;
bool showWarning = false;
private string outpath;
void Start()
{
//Application.persistentDataPath Unity中只有这个路径是既可以读也可以写的。
//Debug.Log(Application.persistentDataPath);
outpath = Appli