浏览代码

Boxed debug panel items in a scrollview

/main
Thomas 7 年前
当前提交
e065274b
共有 1 个文件被更改,包括 11 次插入5 次删除
  1. 16
      ScriptableRenderPipeline/Core/CoreRP/Debugging/DebugPanelUI.cs

16
ScriptableRenderPipeline/Core/CoreRP/Debugging/DebugPanelUI.cs


using System.Collections.Generic;
using UnityEngine;
using System;
namespace UnityEngine.Experimental.Rendering

#if UNITY_EDITOR
// Default implementation for editor UI of a debug panel. Users may override this behavior.
// This will just display all items via their specific handlers in a vertical layout.
Vector2 m_ScrollViewPos;
using (new UnityEditor.EditorGUILayout.VerticalScope())
using (var scope = new UnityEditor.EditorGUILayout.ScrollViewScope(m_ScrollViewPos))
for (int i = 0; i < m_DebugPanel.itemCount; ++i)
using (new UnityEditor.EditorGUILayout.VerticalScope())
m_DebugPanel.GetDebugItem(i).handler.OnEditorGUI();
for (int i = 0; i < m_DebugPanel.itemCount; ++i)
{
m_DebugPanel.GetDebugItem(i).handler.OnEditorGUI();
}
m_ScrollViewPos = scope.scrollPosition;
}
}
#endif

}
}
}
}
}
正在加载...
取消
保存