mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-16 08:17:50 +08:00
Use recursive GetGenericArguments to catch unusual type structures, cleanup InteractiveList value caching
This commit is contained in:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user