Custom Editor Search bar

Hi,

Is there a way to integrate the same search bar that is in the project or hierarchy view in a custom window with the same style.

Thanks.

I grabbed the Editor GUISkin like this to have the GUIStyle list and used it like this :

EditorGUIUtility.LookLikeInspector();
GUILayout.BeginHorizontal(GUI.skin.FindStyle("Toolbar"));
GUILayout.FlexibleSpace();
searchString = GUILayout.TextField(searchString, GUI.skin.FindStyle("ToolbarSeachTextField"));
if (GUILayout.Button("", GUI.skin.FindStyle("ToolbarSeachCancelButton")))
{
	// Remove focus if cleared
	searchString = "";
	GUI.FocusControl(null);
}
GUILayout.EndHorizontal();

But it could break in the futur.

btw1: Is there a link were all the editor styles are referenced ? I used a small trick to look at them, it could be cool to have all the built-in skins.

Just as a note – I see that there’s an EditorStyles class, but the search bar styles are private :frowning: Unity - Scripting API: EditorStyles