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

Doesn't work with IL2CPP #2

Open
d4rkd3v1l opened this issue Apr 10, 2017 · 3 comments
Open

Doesn't work with IL2CPP #2

d4rkd3v1l opened this issue Apr 10, 2017 · 3 comments

Comments

@d4rkd3v1l
Copy link

d4rkd3v1l commented Apr 10, 2017

Sadly this approach isn't working anymore with unity's il2cpp compiler.
So it seems like the only remaining option is unity's SendMessage, which is just a pain in the ass?

NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code.
at UnityPlugin.Awake () [0x00000] in :0

@karsnen
Copy link

karsnen commented Jun 15, 2018

Will this help?

https://answers.unity.com/questions/1229036/callbacks-from-c-to-c-are-not-working-in-540f3.html

@s-hocking
Copy link

Yep, for anyone else reading this, the solution is to make your C# callback delegate methods static.

@caochao
Copy link

caochao commented Jun 20, 2019

so sad, I just want to pass a non-static c# callback to c++, but it can't

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants