Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
Added try/catch around assembly load (#814)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHodgson committed Apr 20, 2021
1 parent 0ae3ba5 commit 43fa762
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Editor/PropertyDrawers/TypeReferencePropertyDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,18 @@ private static IEnumerable<Type> GetFilteredTypes(SystemTypeAttribute filter)

foreach (var assembly in assemblies)
{
var compiledAssembly = Assembly.Load(assembly.name);
Assembly compiledAssembly;

try
{
compiledAssembly = Assembly.Load(assembly.name);
}
catch (Exception e)
{
Debug.LogError(e);
continue;
}

FilterTypes(compiledAssembly, filter, excludedTypes, types);
}

Expand Down

0 comments on commit 43fa762

Please sign in to comment.