using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class debugs : MonoBehaviour
{
public string logs;
void Awake()
{
Application.logMessageReceived += HandleLog;
}
private void HandleLog(string message, string stackTrace, LogType type)
{
string _color = "white";
if (type == LogType.Assert)
_color = "white";
if (type == LogType.Error)
_color = "red";
if (type == LogType.Exception)
_color = "magenta";
if (type == LogType.Log)
_color = "green";
if (type == LogType.Warning)
_color = "yellow";
logs = logs + "<color=" + _color + ">" + message + "</color>\n";
}
}
|