How can i make a toggle button in an editor window toolbar like the “Clear on play” button of the console window. My code for the toolbar looks like this:
GUILayout.BeginHorizontal(EditorStyles.toolbar);
if (GUILayout.Button("Clear All", EditorStyles.toolbarButton)) {
}
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();