BepInEx / Il2CppInterop

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

Small fixes #94

Closed limoka closed 1 year ago

limoka commented 1 year ago

This PR combines a number of small fixes:

  1. Fix inherited injected fields not being initialized on derived classes
  2. Fix errors injecting a type inheriting a abstract type. I'm not entirely sure why this happens, but the baseVTablePointer[i].method in my case was not default, even though all of it's fields were null.
  3. Fix delegate type names including assembly names. This might cause very long names and if such name becomes too long (I think 1024 characters or more), the runtime will not like it.
  4. Fix NRE setting null to Value of Il2CppReferenceField.
  5. Fix Il2Cpp Detour not being applied if target type is a struct. I have tested this change and it does not cause any issues. Patches get called correctly, and ref MyStruct __instance injection works correctly.

I have tested these changes on Core Keeper Unity 2021.3.14.