This error message is coming when we try to use a ValueType in a Delegate from https://github.com/BepInEx/Il2CppInterop/blob/master/Il2CppInterop.Runtime/DelegateSupport.cs#L234
I wanted to ask if its possible to support that and if so whats the blocker?
Because i checked it out a bit and it seems there is already something in the repo regarding this:
- Il2CppInterop.Runtime/Injection/ClassInjector.cs
- Il2CppInterop.HarmonySupport/Il2CppDetourMethodPatcher.cs
Those paths already contain logic to deal with Il2CppSystem.ValueType wrappers by:
- boxing native value data with IL2CPP.il2cpp_value_box
- constructing the managed wrapper from the boxed pointer
- handling struct return buffers for large returns
- copying unboxed data back to native memory
I would also be glad to help on this topic, if its wished! :)
Thanks for reading.
This error message is coming when we try to use a ValueType in a Delegate from https://github.com/BepInEx/Il2CppInterop/blob/master/Il2CppInterop.Runtime/DelegateSupport.cs#L234
I wanted to ask if its possible to support that and if so whats the blocker?
Because i checked it out a bit and it seems there is already something in the repo regarding this:
Those paths already contain logic to deal with Il2CppSystem.ValueType wrappers by:
I would also be glad to help on this topic, if its wished! :)
Thanks for reading.