using UnityEditor; using UnityEngine; namespace VertexColor.ScenePartition.Editor { public static class EditorGUIUtils { public static readonly Color horizontalLineColor = Color.white; public static void HorizontalLine(Color color) { Color prev = GUI.color; GUI.color = color; EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); GUI.color = prev; } public static void HorizontalLine() => HorizontalLine(horizontalLineColor); public struct FoldoutHeaderScope : System.IDisposable { public FoldoutHeaderScope(string label, ref bool foldout) { foldout = EditorGUILayout.BeginFoldoutHeaderGroup(foldout, label); } public readonly void Dispose() { EditorGUILayout.EndFoldoutHeaderGroup(); } } } }