1
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
@@ -5,11 +6,33 @@ using BITKit;
|
||||
using UnityEngine.UIElements;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BITKit.UX
|
||||
{
|
||||
public sealed class UXDebuger : MonoBehaviour
|
||||
{
|
||||
|
||||
private readonly StringBuilder _logBuilder=new();
|
||||
private void OnEnable()
|
||||
{
|
||||
Application.logMessageReceivedThreaded += OnLog;
|
||||
}
|
||||
private void OnDisable()
|
||||
{
|
||||
Application.logMessageReceivedThreaded -= OnLog;
|
||||
}
|
||||
private void OnLog(string condition, string stacktrace, LogType type)
|
||||
{
|
||||
_logBuilder.Append(condition);
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
GUILayout.BeginArea(new Rect(0, 0, Screen.width, Screen.height));
|
||||
GUILayout.BeginVertical();
|
||||
GUILayout.Label(_logBuilder.ToString());
|
||||
GUILayout.EndVertical();
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user