BepInEx / Il2CppInterop

A tool interoperate between CoreCLR and Il2Cpp at runtime
GNU Lesser General Public License v3.0
195 stars 61 forks source link

Improvements to struct interop for DOTS #70

Open limoka opened 1 year ago

limoka commented 1 year ago

This PR includes three improvements, which make working with DOTS based games much easier:

limoka commented 1 year ago

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.

ds5678 commented 2 days ago

Hello! I am open to reviewing this pull request if you rebase it.

limoka commented 2 days ago

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.

limoka commented 2 days ago

Also if I had to guess there is a lot of changes that would be needed because of #124 for this to work properly.

ds5678 commented 2 days ago

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.

limoka commented 2 days ago

Do you have any Cecil to AsmResolver migration guides perhaps? I'm not familiar with the latter.

ds5678 commented 2 days ago

They are very similar, though I don't have any guides.