浏览代码

Disallowed using the editor debug window at the same time as the runtime one

/2018.1
Thomas 6 年前
当前提交
82ec2403
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14
      ScriptableRenderPipeline/Core/CoreRP/Editor/Debugging/DebugWindow.cs

14
ScriptableRenderPipeline/Core/CoreRP/Editor/Debugging/DebugWindow.cs


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);

正在加载...
取消
保存