This repository was archived by the owner on May 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-21
lines changed
src/Inspectors/Reflection Expand file tree Collapse file tree 3 files changed +12
-21
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ public virtual void Disable()
43
43
44
44
public void Destroy ( )
45
45
{
46
- GameObject . Destroy ( this . m_mainContent ) ;
46
+ if ( this . m_mainContent )
47
+ GameObject . Destroy ( this . m_mainContent ) ;
47
48
}
48
49
49
50
public virtual void UpdateValue ( )
Original file line number Diff line number Diff line change @@ -65,18 +65,13 @@ public override void OnValueUpdated()
65
65
{
66
66
RefIDictionary = Value as IDictionary ;
67
67
68
- if ( Value != null )
68
+ if ( m_subContentParent . activeSelf )
69
69
{
70
- if ( m_subContentParent . activeSelf )
71
- {
72
- GetCacheEntries ( ) ;
73
- RefreshDisplay ( ) ;
74
- }
75
- else
76
- m_recacheWanted = true ;
70
+ GetCacheEntries ( ) ;
71
+ RefreshDisplay ( ) ;
77
72
}
78
73
else
79
- m_entries . Clear ( ) ;
74
+ m_recacheWanted = true ;
80
75
81
76
base . OnValueUpdated ( ) ;
82
77
}
@@ -122,7 +117,7 @@ public void GetCacheEntries()
122
117
}
123
118
124
119
#if CPP
125
- if ( RefIDictionary == null && ! Value . IsNullOrDestroyed ( ) )
120
+ if ( RefIDictionary == null && Value != null )
126
121
RefIDictionary = EnumerateWithReflection ( ) ;
127
122
#endif
128
123
Original file line number Diff line number Diff line change @@ -49,18 +49,13 @@ public override void OnValueUpdated()
49
49
RefIEnumerable = Value as IEnumerable ;
50
50
RefIList = Value as IList ;
51
51
52
- if ( Value != null )
52
+ if ( m_subContentParent . activeSelf )
53
53
{
54
- if ( m_subContentParent . activeSelf )
55
- {
56
- GetCacheEntries ( ) ;
57
- RefreshDisplay ( ) ;
58
- }
59
- else
60
- m_recacheWanted = true ;
54
+ GetCacheEntries ( ) ;
55
+ RefreshDisplay ( ) ;
61
56
}
62
57
else
63
- m_entries . Clear ( ) ;
58
+ m_recacheWanted = true ;
64
59
65
60
base . OnValueUpdated ( ) ;
66
61
}
@@ -108,7 +103,7 @@ public void GetCacheEntries()
108
103
}
109
104
110
105
#if CPP
111
- if ( RefIEnumerable == null && ! Value . IsNullOrDestroyed ( ) )
106
+ if ( RefIEnumerable == null && Value != null )
112
107
RefIEnumerable = EnumerateWithReflection ( ) ;
113
108
#endif
114
109
You can’t perform that action at this time.
0 commit comments