@@ -24,17 +24,17 @@ public ObjectSearch(ObjectExplorerPanel parent)
2424 Parent = parent ;
2525 }
2626
27- private SearchContext m_context = SearchContext . UnityObject ;
28- private SceneFilter m_sceneFilter = SceneFilter . Any ;
29- private ChildFilter m_childFilter = ChildFilter . Any ;
27+ private SearchContext context = SearchContext . UnityObject ;
28+ private SceneFilter sceneFilter = SceneFilter . Any ;
29+ private ChildFilter childFilter = ChildFilter . Any ;
3030 private string desiredTypeInput ;
3131 private string lastCheckedTypeInput ;
3232 private bool lastTypeCanHaveGO ;
3333
3434 public ButtonListHandler < object , ButtonCell > dataHandler ;
3535
3636 private ScrollPool < ButtonCell > resultsScrollPool ;
37- private List < object > currentResults = new List < object > ( ) ;
37+ private List < object > currentResults = new ( ) ;
3838
3939 public TypeCompleter typeAutocompleter ;
4040
@@ -54,12 +54,12 @@ public void DoSearch()
5454 {
5555 cachedCellTexts . Clear ( ) ;
5656
57- if ( m_context == SearchContext . Singleton )
57+ if ( context == SearchContext . Singleton )
5858 currentResults = SearchProvider . SingletonSearch ( nameInputField . Text ) ;
59- else if ( m_context == SearchContext . Class )
59+ else if ( context == SearchContext . Class )
6060 currentResults = SearchProvider . ClassSearch ( nameInputField . Text ) ;
6161 else
62- currentResults = SearchProvider . UnityObjectSearch ( nameInputField . Text , desiredTypeInput , m_context , m_childFilter , m_sceneFilter ) ;
62+ currentResults = SearchProvider . UnityObjectSearch ( nameInputField . Text , desiredTypeInput , childFilter , sceneFilter ) ;
6363
6464 dataHandler . RefreshData ( ) ;
6565 resultsScrollPool . Refresh ( true ) ;
@@ -69,7 +69,7 @@ public void DoSearch()
6969
7070 public void Update ( )
7171 {
72- if ( m_context == SearchContext . UnityObject && lastCheckedTypeInput != desiredTypeInput )
72+ if ( context == SearchContext . UnityObject && lastCheckedTypeInput != desiredTypeInput )
7373 {
7474 lastCheckedTypeInput = desiredTypeInput ;
7575
@@ -94,18 +94,18 @@ public void Update()
9494
9595 private void OnContextDropdownChanged ( int value )
9696 {
97- m_context = ( SearchContext ) value ;
97+ context = ( SearchContext ) value ;
9898
9999 lastCheckedTypeInput = null ;
100100 sceneFilterRow . SetActive ( false ) ;
101101 childFilterRow . SetActive ( false ) ;
102102
103- unityObjectClassRow . SetActive ( m_context == SearchContext . UnityObject ) ;
103+ unityObjectClassRow . SetActive ( context == SearchContext . UnityObject ) ;
104104 }
105105
106- private void OnSceneFilterDropChanged ( int value ) => m_sceneFilter = ( SceneFilter ) value ;
106+ private void OnSceneFilterDropChanged ( int value ) => sceneFilter = ( SceneFilter ) value ;
107107
108- private void OnChildFilterDropChanged ( int value ) => m_childFilter = ( ChildFilter ) value ;
108+ private void OnChildFilterDropChanged ( int value ) => childFilter = ( ChildFilter ) value ;
109109
110110 private void OnTypeInputChanged ( string val )
111111 {
@@ -127,7 +127,7 @@ public void SetCell(ButtonCell cell, int index)
127127 if ( ! cachedCellTexts . ContainsKey ( index ) )
128128 {
129129 string text ;
130- if ( m_context == SearchContext . Class )
130+ if ( context == SearchContext . Class )
131131 {
132132 var type = currentResults [ index ] as Type ;
133133 text = $ "{ SignatureHighlighter . Parse ( type , true ) } <color=grey><i>({ type . Assembly . GetName ( ) . Name } )</i></color>";
@@ -143,7 +143,7 @@ public void SetCell(ButtonCell cell, int index)
143143
144144 private void OnCellClicked ( int dataIndex )
145145 {
146- if ( m_context == SearchContext . Class )
146+ if ( context == SearchContext . Class )
147147 InspectorManager . Inspect ( currentResults [ dataIndex ] as Type ) ;
148148 else
149149 InspectorManager . Inspect ( currentResults [ dataIndex ] ) ;
@@ -210,7 +210,11 @@ public override void ConstructUI(GameObject parent)
210210
211211 var sceneDropObj = UIFactory . CreateDropdown ( sceneFilterRow , out Dropdown sceneDrop , null , 14 , OnSceneFilterDropChanged ) ;
212212 foreach ( var name in Enum . GetNames ( typeof ( SceneFilter ) ) )
213+ {
214+ if ( ! SceneHandler . DontDestroyExists && name == "DontDestroyOnLoad" )
215+ continue ;
213216 sceneDrop . options . Add ( new Dropdown . OptionData ( name ) ) ;
217+ }
214218 UIFactory . SetLayoutElement ( sceneDropObj , minHeight : 25 , flexibleHeight : 0 , flexibleWidth : 9999 ) ;
215219
216220 sceneFilterRow . SetActive ( false ) ;
0 commit comments