using System;
using System.Collections.Generic;
using UnityEngine;
using Object = UnityEngine.Object;
namespace AlicizaX.Debugger.Runtime
{
///
/// 调试器组件。
///
[DisallowMultipleComponent]
[AddComponentMenu("Game Framework/Debugger")]
public sealed partial class DebuggerComponent : MonoBehaviour
{
private static DebuggerComponent _instance;
public static DebuggerComponent Instance
{
get
{
if (_instance == null)
{
_instance = FindObjectOfType();
}
return _instance;
}
}
///
/// 默认调试器漂浮框大小。
///
internal static readonly Rect DefaultIconRect = new Rect(10f, 10f, 60f, 60f);
///
/// 默认调试器窗口大小。
///
internal static readonly Rect DefaultWindowRect = new Rect(10f, 10f, 640f, 480f);
///
/// 默认调试器窗口缩放比例。
///
internal static readonly float DefaultWindowScale = 1f;
// private static readonly TextEditor s_TextEditor = new TextEditor();
private IDebuggerModule _mDebuggerModule = null;
private Rect m_DragRect = new Rect(0f, 0f, float.MaxValue, 25f);
private Rect m_IconRect = DefaultIconRect;
private Rect m_WindowRect = DefaultWindowRect;
private float m_WindowScale = DefaultWindowScale;
[SerializeField] private GUISkin m_Skin = null;
[SerializeField] private DebuggerActiveWindowType m_ActiveWindow = DebuggerActiveWindowType.AlwaysOpen;
[SerializeField] private bool m_ShowFullWindow = false;
[SerializeField] private ConsoleWindow m_ConsoleWindow = new ConsoleWindow();
private SystemInformationWindow m_SystemInformationWindow = new SystemInformationWindow();
private EnvironmentInformationWindow m_EnvironmentInformationWindow = new EnvironmentInformationWindow();
private ScreenInformationWindow m_ScreenInformationWindow = new ScreenInformationWindow();
private GraphicsInformationWindow m_GraphicsInformationWindow = new GraphicsInformationWindow();
private InputSummaryInformationWindow m_InputSummaryInformationWindow = new InputSummaryInformationWindow();
private InputTouchInformationWindow m_InputTouchInformationWindow = new InputTouchInformationWindow();
private InputLocationInformationWindow m_InputLocationInformationWindow = new InputLocationInformationWindow();
private InputAccelerationInformationWindow m_InputAccelerationInformationWindow = new InputAccelerationInformationWindow();
private InputGyroscopeInformationWindow m_InputGyroscopeInformationWindow = new InputGyroscopeInformationWindow();
private InputCompassInformationWindow m_InputCompassInformationWindow = new InputCompassInformationWindow();
private PathInformationWindow m_PathInformationWindow = new PathInformationWindow();
private SceneInformationWindow m_SceneInformationWindow = new SceneInformationWindow();
private TimeInformationWindow m_TimeInformationWindow = new TimeInformationWindow();
private QualityInformationWindow m_QualityInformationWindow = new QualityInformationWindow();
private ProfilerInformationWindow m_ProfilerInformationWindow = new ProfilerInformationWindow();
private WebPlayerInformationWindow m_WebPlayerInformationWindow = new WebPlayerInformationWindow();
private RuntimeMemorySummaryWindow m_RuntimeMemorySummaryWindow = new RuntimeMemorySummaryWindow();
private RuntimeMemoryInformationWindow