File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
RuntimeUnityEditor.Core/Windows/REPL/MCS Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 33using System . IO ;
44using System . Reflection ;
55using Mono . CSharp ;
6+ using RuntimeUnityEditor . Core . Utils . Abstractions ;
67
78namespace RuntimeUnityEditor . Core . REPL . MCS
89{
@@ -56,10 +57,18 @@ private static void ImportAppdomainAssemblies(Action<Assembly> import)
5657 {
5758 foreach ( var assembly in AppDomain . CurrentDomain . GetAssemblies ( ) )
5859 {
59- string name = assembly . GetName ( ) . Name ;
60- if ( StdLib . Contains ( name ) )
60+ var assemblyName = assembly . GetName ( ) ;
61+ var shortName = assemblyName . Name ;
62+ if ( StdLib . Contains ( shortName ) )
6163 continue ;
62- import ( assembly ) ;
64+ try
65+ {
66+ import ( assembly ) ;
67+ }
68+ catch ( Exception e )
69+ {
70+ RuntimeUnityEditorCore . Logger . Log ( LogLevel . Warning , $ "[REPL] Failed to import [{ assemblyName . FullName } ]: { e . Message } ") ;
71+ }
6372 }
6473 }
6574 }
You can’t perform that action at this time.
0 commit comments