Unity/C++: Significant re-factoring of Unity header management (see description)

Extract resource handling to UnityResource
Add API header resource helpers
Fix UnityVersion ToString() when Min == Max
Replace fixed list of Il2Cpp header reserved names with parsed names from actual selected headers (solves TypeInfo/MemberInfo problems in 5.3.0-5.3.4 (metadata v16-20))
Use CppDeclarationGenerator when initializing CppTypeCollection to ensure all Il2Cpp header symbols are reserved
Process API headers in CppTypeCollection.FromUnityHeaders
Move #define IS_32BIT handling to UnityHeaders
Update tests
This commit is contained in:
Katy Coe
2020-07-22 19:01:33 +02:00
parent 53909c539c
commit deeb8daa97
12 changed files with 216 additions and 142 deletions

View File

@@ -27,7 +27,7 @@ namespace Il2CppInspector.Outputs
writer = new StreamWriter(fs, Encoding.UTF8);
writeLine("# Generated script file by Il2CppInspector - http://www.djkaty.com - https://github.com/djkaty");
writeLine("# Target Unity version: " + model.UnityHeader);
writeLine("# Target Unity version: " + model.UnityHeaders);
writeLine("print('Generated script file by Il2CppInspector - http://www.djkaty.com - https://github.com/djkaty')");
writeSectionHeader("Preamble");
writePreamble();
@@ -84,7 +84,7 @@ typedef __int64 int64_t;
private void writeTypes() {
writeSectionHeader("IL2CPP internal types");
writeDecls(model.UnityHeaderText);
writeDecls(model.UnityHeaders.GetTypeHeaderText(model.WordSize));
writeSectionHeader("Application types from method calls");
writeTypes(model.GetDependencyOrderedCppTypeGroup("types_from_methods"));