// GUI Style public static void Splitter(Rect position) { if (Event.current.type == EventType.Repaint) { Color restoreColor = GUI.color; GUI.color = SplitterColor; SplitterStyle.Draw(position, false, false, false, false); GUI.color = restoreColor; } }
// GUILayout Style public static void Splitter(Color rgb, float thickness = 1) { Rect position = GUILayoutUtility.GetRect(GUIContent.none, SplitterStyle, GUILayout.Height(thickness)); if (Event.current.type == EventType.Repaint) { Color restoreColor = GUI.color; GUI.color = rgb; SplitterStyle.Draw(position, false, false, false, false); GUI.color = restoreColor; } }