diff --git a/src/Core/Reflection/Extensions.cs b/src/Core/Reflection/Extensions.cs
index f948fd5..98393ef 100644
--- a/src/Core/Reflection/Extensions.cs
+++ b/src/Core/Reflection/Extensions.cs
@@ -36,6 +36,27 @@ namespace UnityExplorer
// ------- Misc extensions --------
+ ///
+ /// Recursively check the type and its base types to find any generic arguments.
+ ///
+ public static bool TryGetGenericArguments(this Type type, out Type[] args)
+ {
+ if (type.IsGenericType)
+ {
+ args = type.GetGenericArguments();
+ return true;
+ }
+ else if (type.BaseType != null)
+ {
+ return TryGetGenericArguments(type.BaseType, out args);
+ }
+ else
+ {
+ args = null;
+ return false;
+ }
+ }
+
///
/// Safely try to get all Types inside an Assembly.
///
diff --git a/src/UI/IValues/InteractiveDictionary.cs b/src/UI/IValues/InteractiveDictionary.cs
index f17c447..e49161c 100644
--- a/src/UI/IValues/InteractiveDictionary.cs
+++ b/src/UI/IValues/InteractiveDictionary.cs
@@ -75,10 +75,11 @@ namespace UnityExplorer.UI.IValues
else
{
var type = value.GetActualType();
- if (type.IsGenericType && type.GetGenericArguments().Length == 2)
- {
- KeyType = type.GetGenericArguments()[0];
- ValueType = type.GetGenericArguments()[1];
+
+ if (type.TryGetGenericArguments(out var args) && args.Length == 2)
+ {
+ KeyType = args[0];
+ ValueType = args[1];
}
else
{
diff --git a/src/UI/IValues/InteractiveList.cs b/src/UI/IValues/InteractiveList.cs
index 16a13ed..6a1f6be 100644
--- a/src/UI/IValues/InteractiveList.cs
+++ b/src/UI/IValues/InteractiveList.cs
@@ -28,8 +28,7 @@ namespace UnityExplorer.UI.IValues
private bool IsWritableGenericIList;
private PropertyInfo genericIndexer;
- public int ItemCount => values.Count;
- private readonly List