File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -224,17 +224,17 @@ public List<ScriptableObjectCollection> GetCollectionsByItemType(Type targetColl
224224
225225 for ( int i = 0 ; i < collections . Count ; i ++ )
226226 {
227- ScriptableObjectCollection scriptableObjectCollection = collections [ i ] ;
228- if ( targetCollectionItemType . IsAssignableFrom ( scriptableObjectCollection . GetItemType ( ) ) )
227+ ScriptableObjectCollection col = collections [ i ] ;
228+ Type collectionItemType = col . GetItemType ( ) ;
229+ if ( collectionItemType != null && collectionItemType . IsAssignableFrom ( targetCollectionItemType ) )
229230 {
230- result . Add ( scriptableObjectCollection ) ;
231+ result . Add ( col ) ;
231232 }
232233 }
233234
234235 return result ;
235236 }
236237
237-
238238 [ Obsolete ( "Use GetCollectionByGUID(ULongGuid guid) is obsolete, please regenerate your static class" ) ]
239239 public ScriptableObjectCollection GetCollectionByGUID ( string guid )
240240 {
You can’t perform that action at this time.
0 commit comments