Better EntryType checking for enumerables and dicts

This commit is contained in:
Sinai
2021-05-19 19:24:33 +10:00
parent e5d2d29a47
commit 5abfa3da67
5 changed files with 124 additions and 35 deletions

View File

@ -74,12 +74,7 @@ namespace UnityExplorer.UI.IValues
else
{
var type = value.GetActualType();
if (type.TryGetGenericArguments(out var args))
EntryType = args[0];
else if (type.HasElementType)
EntryType = type.GetElementType();
else
EntryType = typeof(object);
ReflectionUtility.TryGetEntryType(type, out EntryType);
CacheEntries(value);