Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add il2cpp mode #282

Open
fingerx opened this issue Jan 6, 2024 · 5 comments
Open

add il2cpp mode #282

fingerx opened this issue Jan 6, 2024 · 5 comments
Labels
feature request API changes required unity Issue is related to Unity game engine
Projects
Milestone

Comments

@fingerx
Copy link

fingerx commented Jan 6, 2024

This is an excellent library, but I encountered problems when compiling with the IL2CPP mode. I hope support for Unity IL2CPP mode can be added. Thank you very much!

error msg:
Unity: NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code. The method we're attempting to marshal is: Melanchall.DryWetMidi.Multimedia.InputDevice::OnMessage_Win
Melanchall.DryWetMidi.Multimedia.InputDeviceApi64.Api_OpenDevice_Win (System.IntPtr info, System.IntPtr sessionHandle, Melanchall.DryWetMidi.Multimedia.InputDeviceApi+Callback_Win callback, System.Int32 sysExBufferSize, System.IntPtr& handle) (at <00000000000000000000000000000000>:0)
Melanchall.DryWetMidi.Multimedia.InputDevice.EnsureHandleIsCreated () (at <00000000000000000000000000000000>:0)
Melanchall.DryWetMidi.Multimedia.InputDevice.StartEventsListening () (at <00000000000000000000000000000000>:0)

@melanchall
Copy link
Owner

Hi,

I know about this problem, but I can't turn those methods within the library into static ones unfortunately. It will just ruine the logic. I'm going to keep the issue open but right now I can't provide a solution.

Thanks,
Max

@melanchall melanchall added 3d party bug Bug in software that uses the library unity Issue is related to Unity game engine labels Jan 6, 2024
@melanchall melanchall added this to To do in DryWetMIDI via automation Jan 6, 2024
@melanchall melanchall added feature request API changes required and removed 3d party bug Bug in software that uses the library labels Jan 8, 2024
@melanchall melanchall added this to the Future milestone Jan 10, 2024
@melanchall
Copy link
Owner

@fingerx Hi,

Can you please say, do you build your game with IL2CPP on Windows?

@fingerx
Copy link
Author

fingerx commented Feb 5, 2024

@melanchall yes,but not game. it is window application for x64

@melanchall
Copy link
Owner

@fingerx Can you please say how to create such an application? Or maybe you can provide me a sample Visual Studio solution so I can run it on my side to debug?

@melanchall
Copy link
Owner

@fingerx Can you please provide info?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request API changes required unity Issue is related to Unity game engine
Projects
DryWetMIDI
  
To do
Development

No branches or pull requests

2 participants