mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-11-19 13:17:10 +00:00
safer type loading
This commit is contained in:
1 file changed
+2
-1
@@ -7,6 +7,7 @@ using System.Reflection;
|
||||
using BepInEx;
|
||||
using BepInEx.Configuration;
|
||||
using BepInEx.Unity.IL2CPP;
|
||||
using HarmonyLib;
|
||||
using MiraAPI.Colors;
|
||||
using MiraAPI.Events;
|
||||
using MiraAPI.GameEnd;
|
||||
@@ -176,7 +177,7 @@ public sealed class MiraPluginManager
|
||||
|
||||
var context = new RegistrationContext(info, plugin, basePlugin, roles);
|
||||
|
||||
foreach (var type in assembly.GetTypes())
|
||||
foreach (var type in AccessTools.GetTypesFromAssembly(assembly))
|
||||
{
|
||||
if (type.IsDefined<MiraIgnoreAttribute>())
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user