mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-11 09:58:02 +08:00
Use reflection for AllTypes until it's public
This commit is contained in:
1 parent
f6d0acab7b
commit
df8522963e
1 file changed
+5
-3
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using HarmonyLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UniverseLib;
|
||||
using UniverseLib.UI;
|
||||
@@ -64,9 +65,10 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
|
||||
allowedTypes = ReflectionUtility.GetImplementationsOf(BaseType, allowAbstract, allowEnum, false);
|
||||
else
|
||||
{
|
||||
// TODO: Use direct reference. Will make AllTypes public in next release of UniverseLib
|
||||
allowedTypes = new();
|
||||
foreach (var entry in ReflectionUtility.AllTypes)
|
||||
allowedTypes.Add(entry.Value as Type);
|
||||
foreach (var entry in (SortedDictionary<string, Type>)AccessTools.Field(typeof(ReflectionUtility), "AllTypes").GetValue(null))
|
||||
allowedTypes.Add(entry.Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user