* Added support for Il2Cpp IList objects
* Improved support for Lists in general, they should now work better.
This commit is contained in:
sinaioutlander
2020-08-31 18:23:19 +10:00
parent 30b48b1f1f
commit d8688193d5
4 changed files with 203 additions and 75 deletions

View File

@ -79,9 +79,16 @@ namespace Explorer
public static bool IsList(Type t)
{
return t.IsGenericType
&& t.GetGenericTypeDefinition() is Type typeDef
&& (typeDef.IsAssignableFrom(typeof(List<>)) || typeDef.IsAssignableFrom(typeof(Il2CppSystem.Collections.Generic.List<>)));
if (t.IsGenericType)
{
return t.GetGenericTypeDefinition() is Type typeDef
&& (typeDef.IsAssignableFrom(typeof(Il2CppSystem.Collections.Generic.List<>))
|| typeDef.IsAssignableFrom(typeof(Il2CppSystem.Collections.Generic.IList<>)));
}
else
{
return t.IsAssignableFrom(typeof(Il2CppSystem.Collections.IList));
}
}
public static bool IsDictionary(Type t)