- Home /
 
               Question by 
               eskivor · Jun 14, 2017 at 10:59 AM · 
                editor-scriptinghierarchyeditor windowbar  
              
 
              Is there a way to enter a text in the search bar of the hierarchy window by an editor script ?
I'm currently working on a editor script and I wanted to know if is there a way enter directly a text directly in the textfield of a search bar in a editor window, here the hierarchy window.
I want to set my on string on a textfield on already existing the search bar, not recreating a new one either recreating a new hierarchy window.
I want a result something like this :

when I type a script something like that :
 using UnityEngine;
 using UnityEditor;
 
 public class ExampleScript : MonoBehaviour
 {
     [MenuItem("Test/Do A Search")]
     void Search ()
     {
         EditorHierarchyWindow.SearchBar.EnterText ("Something");
     }
 }
Is there a way to doing it ? Thank you in advance.
 
                 
                hierarchy-search-bar.png 
                (3.3 kB) 
               
 
              
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by eskivor · Jul 08, 2017 at 04:10 PM
I finally found my answer myself here : https://stackoverflow.com/questions/29575964/setting-a-hierarchy-filter-via-script?newreg=cb894508dece4a8eb3d8eadb4397ed96
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                