public static void DrawLine(ColorValue color = ColorValue.Grey) { var previousColor = GUI.color; GUI.color = EditorDrawUtility.GetColor(color); GUILayout.Box(GUIContent.none, GUIStyleUtility.HorizontalLine(false)); GUI.color = previousColor; }
public override void BeginDrawGroup(string label, bool drawName, int indentLevel) { GUILayout.BeginVertical(GUIStyleUtility.LightBox(indentLevel)); EditorGUI.indentLevel++; if (drawName && !string.IsNullOrEmpty(label)) { EditorGUILayout.LabelField(label, GUIStyleUtility.BoxGroupLabel); } }
public bool BeginFoldout(bool foldout, string label, int indentLevel) { GUILayout.BeginVertical(GUIStyleUtility.FoldGroupHeader(indentLevel)); EditorGUI.indentLevel = 1; GUILayout.BeginVertical(GUIStyleUtility.FoldGroupHeaderContent); foldout = EditorDrawUtility.DrawFoldout(foldout, label, GUIStyleUtility.BoldFoldout); GUILayout.EndVertical(); if (foldout) { return(true); } EditorGUI.indentLevel = indentLevel; GUILayout.EndVertical(); return(false); }