jacksondunstan / UnityNativeScripting

Unity Scripting in C++
https://jacksondunstan.com/articles/3938
MIT License
1.33k stars 135 forks source link

Bindings.h contains a definition for the function but not Bindings.cs #58

Closed SeleDreams closed 4 years ago

SeleDreams commented 4 years ago

Hello, I'm posting this issue because when I am trying to pass a string on Debug::Log for instance it works fine, but when I send them to any custom function taking Objects as arguments (in my case it was two string objects), I get exceptions image

what's weird is that I copied the exact same syntax of Debug.Log, thinking it had to be made in a specific manner and even deleted the entire body of the function leaving it as a function just being called and doing nothing, but even then it still crashes

all I want to do is compare two strings but it seems like a pain (because I am doing some checks with strings returned by the Unity API)

SeleDreams commented 4 years ago

I noticed that my CustomCPPFunctions class is referenced nowhere in Bindings.cs, however, it gets referenced in Bindings.h

I think the reason it crashes is because while it is referenced in the binding.h, the binding.cs doesn't contain it, which prevents the function from being called I can't tell why it happens

this is the json image