File tree Expand file tree Collapse file tree 1 file changed +19
-12
lines changed
Editor/AssetBundleDataSource Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -25,19 +25,26 @@ private static List<Type> BuildCustomABDataSourceList()
2525 var x = AppDomain . CurrentDomain . GetAssemblies ( ) ;
2626 foreach ( var assembly in x )
2727 {
28- var list = new List < Type > (
29- assembly
30- . GetTypes ( )
31- . Where ( t => t != typeof ( ABDataSource ) )
32- . Where ( t => typeof ( ABDataSource ) . IsAssignableFrom ( t ) ) ) ;
33-
34-
35- for ( int count = 0 ; count < list . Count ; count ++ )
28+ try
29+ {
30+ var list = new List < Type > (
31+ assembly
32+ . GetTypes ( )
33+ . Where ( t => t != typeof ( ABDataSource ) )
34+ . Where ( t => typeof ( ABDataSource ) . IsAssignableFrom ( t ) ) ) ;
35+
36+
37+ for ( int count = 0 ; count < list . Count ; count ++ )
38+ {
39+ if ( list [ count ] . Name == "AssetDatabaseABDataSource" )
40+ properList [ 0 ] = list [ count ] ;
41+ else if ( list [ count ] != null )
42+ properList . Add ( list [ count ] ) ;
43+ }
44+ }
45+ catch ( System . Exception )
3646 {
37- if ( list [ count ] . Name == "AssetDatabaseABDataSource" )
38- properList [ 0 ] = list [ count ] ;
39- else if ( list [ count ] != null )
40- properList . Add ( list [ count ] ) ;
47+ //assembly which raises exception on the GetTypes() call - ignore it
4148 }
4249 }
4350
You can’t perform that action at this time.
0 commit comments