@@ -24,17 +24,17 @@ public ObjectSearch(ObjectExplorerPanel parent)
24
24
Parent = parent ;
25
25
}
26
26
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 ;
30
30
private string desiredTypeInput ;
31
31
private string lastCheckedTypeInput ;
32
32
private bool lastTypeCanHaveGO ;
33
33
34
34
public ButtonListHandler < object , ButtonCell > dataHandler ;
35
35
36
36
private ScrollPool < ButtonCell > resultsScrollPool ;
37
- private List < object > currentResults = new List < object > ( ) ;
37
+ private List < object > currentResults = new ( ) ;
38
38
39
39
public TypeCompleter typeAutocompleter ;
40
40
@@ -54,12 +54,12 @@ public void DoSearch()
54
54
{
55
55
cachedCellTexts . Clear ( ) ;
56
56
57
- if ( m_context == SearchContext . Singleton )
57
+ if ( context == SearchContext . Singleton )
58
58
currentResults = SearchProvider . SingletonSearch ( nameInputField . Text ) ;
59
- else if ( m_context == SearchContext . Class )
59
+ else if ( context == SearchContext . Class )
60
60
currentResults = SearchProvider . ClassSearch ( nameInputField . Text ) ;
61
61
else
62
- currentResults = SearchProvider . UnityObjectSearch ( nameInputField . Text , desiredTypeInput , m_context , m_childFilter , m_sceneFilter ) ;
62
+ currentResults = SearchProvider . UnityObjectSearch ( nameInputField . Text , desiredTypeInput , childFilter , sceneFilter ) ;
63
63
64
64
dataHandler . RefreshData ( ) ;
65
65
resultsScrollPool . Refresh ( true ) ;
@@ -69,7 +69,7 @@ public void DoSearch()
69
69
70
70
public void Update ( )
71
71
{
72
- if ( m_context == SearchContext . UnityObject && lastCheckedTypeInput != desiredTypeInput )
72
+ if ( context == SearchContext . UnityObject && lastCheckedTypeInput != desiredTypeInput )
73
73
{
74
74
lastCheckedTypeInput = desiredTypeInput ;
75
75
@@ -94,18 +94,18 @@ public void Update()
94
94
95
95
private void OnContextDropdownChanged ( int value )
96
96
{
97
- m_context = ( SearchContext ) value ;
97
+ context = ( SearchContext ) value ;
98
98
99
99
lastCheckedTypeInput = null ;
100
100
sceneFilterRow . SetActive ( false ) ;
101
101
childFilterRow . SetActive ( false ) ;
102
102
103
- unityObjectClassRow . SetActive ( m_context == SearchContext . UnityObject ) ;
103
+ unityObjectClassRow . SetActive ( context == SearchContext . UnityObject ) ;
104
104
}
105
105
106
- private void OnSceneFilterDropChanged ( int value ) => m_sceneFilter = ( SceneFilter ) value ;
106
+ private void OnSceneFilterDropChanged ( int value ) => sceneFilter = ( SceneFilter ) value ;
107
107
108
- private void OnChildFilterDropChanged ( int value ) => m_childFilter = ( ChildFilter ) value ;
108
+ private void OnChildFilterDropChanged ( int value ) => childFilter = ( ChildFilter ) value ;
109
109
110
110
private void OnTypeInputChanged ( string val )
111
111
{
@@ -127,7 +127,7 @@ public void SetCell(ButtonCell cell, int index)
127
127
if ( ! cachedCellTexts . ContainsKey ( index ) )
128
128
{
129
129
string text ;
130
- if ( m_context == SearchContext . Class )
130
+ if ( context == SearchContext . Class )
131
131
{
132
132
var type = currentResults [ index ] as Type ;
133
133
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)
143
143
144
144
private void OnCellClicked ( int dataIndex )
145
145
{
146
- if ( m_context == SearchContext . Class )
146
+ if ( context == SearchContext . Class )
147
147
InspectorManager . Inspect ( currentResults [ dataIndex ] as Type ) ;
148
148
else
149
149
InspectorManager . Inspect ( currentResults [ dataIndex ] ) ;
@@ -210,7 +210,11 @@ public override void ConstructUI(GameObject parent)
210
210
211
211
var sceneDropObj = UIFactory . CreateDropdown ( sceneFilterRow , out Dropdown sceneDrop , null , 14 , OnSceneFilterDropChanged ) ;
212
212
foreach ( var name in Enum . GetNames ( typeof ( SceneFilter ) ) )
213
+ {
214
+ if ( ! SceneHandler . DontDestroyExists && name == "DontDestroyOnLoad" )
215
+ continue ;
213
216
sceneDrop . options . Add ( new Dropdown . OptionData ( name ) ) ;
217
+ }
214
218
UIFactory . SetLayoutElement ( sceneDropObj , minHeight : 25 , flexibleHeight : 0 , flexibleWidth : 9999 ) ;
215
219
216
220
sceneFilterRow . SetActive ( false ) ;
0 commit comments