diff --git a/ConfigurationManager/SettingSearcher.cs b/ConfigurationManager/SettingSearcher.cs index 0de1314..6e06833 100644 --- a/ConfigurationManager/SettingSearcher.cs +++ b/ConfigurationManager/SettingSearcher.cs @@ -52,11 +52,12 @@ public static void CollectSettings(out IEnumerable results, ou var type = plugin.GetType(); var pluginInfo = plugin.Info.Metadata; + var pluginName = pluginInfo?.Name ?? plugin.GetType().FullName; if (type.GetCustomAttributes(typeof(BrowsableAttribute), false).Cast() - .Any(x => !x.Browsable)) + .Any(x => !x.Browsable)) { - modsWithoutSettings.Add(pluginInfo.Name); + modsWithoutSettings.Add(pluginName); continue; } @@ -67,7 +68,7 @@ public static void CollectSettings(out IEnumerable results, ou detected.RemoveAll(x => x.Browsable == false); if (detected.Count == 0) - modsWithoutSettings.Add(pluginInfo.Name); + modsWithoutSettings.Add(pluginName); // Allow to enable/disable plugin if it uses any update methods ------ if (showDebug && type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).Any(x => _updateMethodNames.Contains(x.Name)))