From a9b0df0d223f94b7bdb4b3e2bcb5b77c0c4deafc Mon Sep 17 00:00:00 2001 From: Nate Hill Date: Wed, 4 Jan 2023 19:31:47 -0600 Subject: [PATCH] Fixed an issue where ForEachAssembly() didn't catch a TypeLoadException that can be thrown by GetCustomAttributes(). --- Editor/ConditionalCompilationUtility.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Editor/ConditionalCompilationUtility.cs b/Editor/ConditionalCompilationUtility.cs index a763cfb..079aadb 100644 --- a/Editor/ConditionalCompilationUtility.cs +++ b/Editor/ConditionalCompilationUtility.cs @@ -213,7 +213,7 @@ static void ForEachAssembly(Action callback) { callback(assembly); } - catch (ReflectionTypeLoadException) + catch (Exception ex) when (ex is ReflectionTypeLoadException || ex is TypeLoadException) { // Skip any assemblies that don't load properly continue;