diff --git a/src/CachedObjects/CacheObjectBase.cs b/src/CachedObjects/CacheObjectBase.cs
index e1b673c..3f6d199 100644
--- a/src/CachedObjects/CacheObjectBase.cs
+++ b/src/CachedObjects/CacheObjectBase.cs
@@ -172,7 +172,7 @@ namespace Explorer
{
holder = new CacheDictionary();
}
- else if (ReflectionHelpers.IsEnumerable(valueType) || ReflectionHelpers.IsCppList(valueType))
+ else if (ReflectionHelpers.IsEnumerable(valueType) || ReflectionHelpers.IsCppEnumerable(valueType))
{
holder = new CacheList();
}
diff --git a/src/CachedObjects/Object/CacheDictionary.cs b/src/CachedObjects/Object/CacheDictionary.cs
index af7530b..056eff1 100644
--- a/src/CachedObjects/Object/CacheDictionary.cs
+++ b/src/CachedObjects/Object/CacheDictionary.cs
@@ -228,7 +228,7 @@ namespace Explorer
var negativeWhitespace = window.width - (whitespace + 100f);
GUI.skin.button.alignment = TextAnchor.MiddleLeft;
- string btnLabel = $"[{count}] Dictionary<{TypeOfKeys.FullName}, {TypeOfValues.FullName}>";
+ string btnLabel = $"[{count}] Dictionary<{TypeOfKeys.FullName}, {TypeOfValues.FullName}>";
if (GUILayout.Button(btnLabel, new GUILayoutOption[] { GUILayout.Width(negativeWhitespace) }))
{
WindowManager.InspectObject(Value, out bool _);
diff --git a/src/CachedObjects/Object/CacheList.cs b/src/CachedObjects/Object/CacheList.cs
index 6713d45..28c2971 100644
--- a/src/CachedObjects/Object/CacheList.cs
+++ b/src/CachedObjects/Object/CacheList.cs
@@ -40,7 +40,7 @@ namespace Explorer
private Type m_genericTypeDef;
// Cached ToArray method for Lists
- public MethodInfo GenericToArrayMethod
+ public MethodInfo CppListToArrayMethod
{
get => GetGenericToArrayMethod();
}
@@ -60,7 +60,7 @@ namespace Explorer
{
if (m_enumerable == null && Value != null)
{
- m_enumerable = Value as IEnumerable ?? GetEnumerableFromIl2CppList();
+ m_enumerable = Value as IEnumerable ?? EnumerateWithReflection();
}
return m_enumerable;
}
@@ -100,21 +100,45 @@ namespace Explorer
return m_itemProperty;
}
- private IEnumerable GetEnumerableFromIl2CppList()
+ private IEnumerable EnumerateWithReflection()
{
if (Value == null) return null;
if (GenericTypeDef == typeof(Il2CppSystem.Collections.Generic.List<>))
{
- return (IEnumerable)GenericToArrayMethod?.Invoke(Value, new object[0]);
+ return (IEnumerable)CppListToArrayMethod?.Invoke(Value, new object[0]);
+ }
+ else if (GenericTypeDef == typeof(Il2CppSystem.Collections.Generic.HashSet<>))
+ {
+ return CppHashSetToMono();
}
else
{
- return ConvertIListToMono();
+ return CppIListToMono();
}
}
- private IList ConvertIListToMono()
+ private IEnumerable CppHashSetToMono()
+ {
+ var set = new HashSet