public bool Toggle(string text, bool open, bool allowCollapse = true) { var result = GUIHelpers.DoToolbar(text, open); if (open || result) { EditorGUILayout.Space(); if (result) { return(!open); } } return(open); }
public bool Toggle(string text, bool open, bool allowCollapse = true) { var result = GUIHelpers.DoToolbar(text, open); if (open || result) { EditorGUILayout.Space(); if (result) { return(!open); } } return(open); //var rect = UBEditor.GetRect(UBStyles.SubHeaderStyle); //var result = GUI.Toggle(rect, open,allowCollapse ? (open ? "- " : "+ ") + text : text, UBStyles.SubHeaderStyle); //return result; }