unity3d 日志捕捉

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;
}
}
上一篇:HDU 3342 Legal or Not (图是否有环)


下一篇:iKcamp新书上市《Koa与Node.js开发实战》