searchString = GUILayout.TextField(searchString, GUI.skin.FindStyle("ToolbarSeachTextField"));
if I have for example: Guid it will find it only I start typing with G...Gui but if I will type gui....it will not find it. and if I type only g it will find other results with lower cases of g.
but I want both upper and lower case when searching.
string searchString;
void OnGUI()
{
GUI.color = Color.white;
GUILayout.FlexibleSpace();
searchString = GUILayout.TextField(searchString, GUI.skin.FindStyle("ToolbarSeachTextField"));
if (GUILayout.Button("", GUI.skin.FindStyle("ToolbarSeachCancelButton")))
{
searchString = "";
GUI.FocusControl(null);
}
scrollPos =
EditorGUILayout.BeginScrollView(scrollPos, false,true,
GUILayout.ExpandWidth(true), GUILayout.Height(position.height));
foreach (KeyValuePair<GameObject, string> pair in dictio)
{
EditorGUILayout.BeginHorizontal();
if (searchString != null)
{
if (pair.Value.Contains(searchString))
{
EditorGUILayout.ObjectField(pair.Key, typeof(GameObject), true);
num.Add(EditorGUILayout.TextField(pair.Value).Length);
}
}
EditorGUILayout.EndHorizontal();
}
GUILayout.EndScrollView();
}