Implement and output enumerations

This commit is contained in:
Katy Coe
2017-11-22 17:38:15 +01:00
parent b3883802bd
commit 1a81e9a0fb
3 changed files with 76 additions and 47 deletions

View File

@@ -48,12 +48,16 @@ namespace Il2CppInspector.Reflection
return new TypeInfo(this, pType, memberType);
default:
// Basic primitive types
if ((int) pType.type >= Il2CppConstants.FullNameTypeString.Count)
return null;
return Assemblies.SelectMany(x => x.DefinedTypes).First(x => x.FullName == Il2CppConstants.FullNameTypeString[(int)pType.type]);
return GetTypeFromEnum(pType.type);
}
}
// Basic primitive types
public TypeInfo GetTypeFromEnum(Il2CppTypeEnum t) {
if ((int)t >= Il2CppConstants.FullNameTypeString.Count)
return null;
return Assemblies.SelectMany(x => x.DefinedTypes).First(x => x.FullName == Il2CppConstants.FullNameTypeString[(int)t]);
}
}
}