|
|
|
|
|
|
static Dictionary<Type, Type> s_WidgetStateMap; // DebugUI.Widget type -> DebugState type
|
|
|
|
static Dictionary<Type, DebugUIDrawer> s_WidgetDrawerMap; // DebugUI.Widget type -> DebugUIDrawer
|
|
|
|
|
|
|
|
bool m_IsActiveInPlayMode |
|
|
|
{ |
|
|
|
get { return Application.isPlaying && DebugManager.instance.displayRuntimeUI; } |
|
|
|
} |
|
|
|
|
|
|
|
[DidReloadScripts] |
|
|
|
static void OnEditorReload() |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
void Update() |
|
|
|
{ |
|
|
|
if (m_IsActiveInPlayMode) |
|
|
|
return; |
|
|
|
|
|
|
|
int treeState = DebugManager.instance.GetState(); |
|
|
|
|
|
|
|
if (m_DebugTreeState != treeState || m_IsDirty) |
|
|
|
|
|
|
{ |
|
|
|
if (s_Styles == null) |
|
|
|
s_Styles = new Styles(); |
|
|
|
|
|
|
|
if (m_IsActiveInPlayMode) |
|
|
|
{ |
|
|
|
EditorGUILayout.HelpBox("The editor debug window is disabled while the runtime one is active.", MessageType.Info); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var panels = DebugManager.instance.panels; |
|
|
|
int itemCount = panels.Count(x => !x.isRuntimeOnly && x.children.Count(w => !w.isRuntimeOnly) > 0); |
|
|
|