File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ public void LoadData(T targetObject)
138138 string path = AssetDatabase . GetAssetPath ( targetObject ) ;
139139 _import = AssetImporter . GetAtPath ( path ) ;
140140 }
141- catch ( Exception e )
141+ catch
142142 {
143143 return ;
144144 }
@@ -163,7 +163,7 @@ public void LoadData(T targetObject)
163163 _overridden = extractedData . Item3 ?? new List < string > ( ) ;
164164 _children = extractedData . Item4 ?? new List < string > ( ) ;
165165 }
166- catch ( Exception e )
166+ catch
167167 {
168168 _parent = null ;
169169 _overridden = new List < string > ( ) ;
Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ public override void ProcessMemberProperties(List<InspectorPropertyInfo> propert
4848 {
4949 Selection . selectionChanged += OnSelectionChanged ;
5050 _selectionChangedFlag = true ;
51+
52+ AssemblyReloadEvents . beforeAssemblyReload += OnBeforeAssemblyReloads ;
5153 }
5254
5355 if ( _soVariant == null || _soVariant . _overridden == null || _soVariant . _import == null || _soVariant . _children == null ) {
@@ -91,9 +93,12 @@ public override void ProcessMemberProperties(List<InspectorPropertyInfo> propert
9193 }
9294 }
9395
96+ private void OnBeforeAssemblyReloads ( ) => OnSelectionChanged ( ) ;
97+
9498
9599 private void OnSelectionChanged ( )
96100 {
101+ AssemblyReloadEvents . beforeAssemblyReload -= OnBeforeAssemblyReloads ;
97102 Selection . selectionChanged -= OnSelectionChanged ;
98103 _selectionChangedFlag = false ;
99104
You can’t perform that action at this time.
0 commit comments