Improvements to struct interop for DOTS
This PR includes three improvements, which make working with DOTS based games much easier:
- Allow to inject custom structs into il2cpp runtime.
- A fix to how methods with struct pointers are generated.
- Allow Generic structs to be marked as blittable. This change could be breaking as some structs previously marked as classes now are structs. I'm performing checks if the struct is indeed blittable and making it's generic parameters constrained to
unmanaged.
With the last commit, I think I fixed the generation issue Kasuromi found earlier. Now I added another kind of TypeSpecifics: GenericBlittableStruct, meaning blittability depends on used type arguments. For such structs I generate both boxed and unboxed versions, and switch them depending on the generic arguments.
Hello! I am open to reviewing this pull request if you rebase it.
I can do that sometime later, however recently I'm rather busy with Core Keeper's 1.0 release. On top of that I no longer have a test game. Core Keeper no longer uses il2cpp, and the only other game I know of that uses this PR is VRising.
Also if I had to guess there is a lot of changes that would be needed because of #124 for this to work properly.
Also if I had to guess there is a lot of changes that would be needed because of #124 for this to work properly.
That is correct. The switch to AsmResolver required many changes. In some ways, it was a rewrite of the generator.
Do you have any Cecil to AsmResolver migration guides perhaps? I'm not familiar with the latter.
They are very similar, though I don't have any guides.