//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2020 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using GameFramework;
using GameFramework.Debugger;
using GeneralTools;
using System.Collections.Generic;
using UnityEngine;
namespace UnityGameFramework.Runtime
{
///
/// 调试器组件。
///
[DisallowMultipleComponent]
[AddComponentMenu("Game Framework/Debugger")]
public sealed partial class DebuggerComponent : SingletonBaseAttribute
{
///
/// Whether to open the window by shaking the device (mobile-only) 手机移动平台抖动唤出或隐藏日志.
///
private bool shakeToOpen = true;
///
/// The (squared) acceleration above which the window should open.
///
private float shakeAcceleration = 3f;
///
/// The hotkey to show and hide the console window win平台双击D.
///
private KeyCode toggleKey = KeyCode.D;
///
/// 默认调试器漂浮框大小。
///
internal static readonly Rect DefaultIconRect = new Rect(10f, 10f, 60f, 60f);
///
/// 默认调试器窗口大小。
///
internal static readonly Rect DefaultWindowRect = new Rect(10f, 10f, Screen.width , Screen.height );
///
/// 默认调试器窗口缩放比例。
///
internal static readonly float DefaultWindowScale = 1f;
private DebuggerManager m_DebuggerManager = 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