diff --git a/src/Core/Reflection/ReflectionUtility.cs b/src/Core/Reflection/ReflectionUtility.cs index 4eb7bce..053b616 100644 --- a/src/Core/Reflection/ReflectionUtility.cs +++ b/src/Core/Reflection/ReflectionUtility.cs @@ -87,6 +87,7 @@ namespace UnityExplorer { foreach (var type in asm.TryGetTypes()) { + // Cache namespace if there is one if (!string.IsNullOrEmpty(type.Namespace) && !uniqueNamespaces.Contains(type.Namespace)) { uniqueNamespaces.Add(type.Namespace); @@ -100,16 +101,16 @@ namespace UnityExplorer AllNamespaces.Insert(i, type.Namespace); } + // Cache the type. Overwrite type if one exists with the full name if (AllTypes.ContainsKey(type.FullName)) AllTypes[type.FullName] = type; else - { AllTypes.Add(type.FullName, type); - //allTypeNames.Add(type.FullName); - } + // Invoke listener OnTypeLoaded?.Invoke(type); + // Check type inheritance cache, add this to any lists it should be in foreach (var key in typeInheritance.Keys) { try @@ -154,13 +155,6 @@ namespace UnityExplorer internal virtual string Internal_ProcessTypeInString(string theString, Type type) => theString; - //// Force loading modules - //public static bool LoadModule(string moduleName) - // => Instance.Internal_LoadModule(moduleName); - // - //internal virtual bool Internal_LoadModule(string moduleName) - // => false; - // Singleton finder public static void FindSingleton(string[] possibleNames, Type type, BindingFlags flags, List instances) diff --git a/src/Loader/BIE/BepInExConfigHandler.cs b/src/Loader/BIE/BepInExConfigHandler.cs index e0f631f..c968e6a 100644 --- a/src/Loader/BIE/BepInExConfigHandler.cs +++ b/src/Loader/BIE/BepInExConfigHandler.cs @@ -21,11 +21,7 @@ namespace UnityExplorer.Loader.BIE public override void RegisterConfigElement(ConfigElement config) { - object[] tags = null; - if (config.IsInternal) - tags = new[] { "Advanced" }; - - var entry = Config.Bind(CTG_NAME, config.Name, config.Value, new ConfigDescription(config.Description, null, tags)); + var entry = Config.Bind(CTG_NAME, config.Name, config.Value, config.Description); entry.SettingChanged += (object o, EventArgs e) => {