Unitysendmessage with c# -- can't get it to call method in Unity

I’m having problems getting unitysendmessage to work in iOS. Basically I’ve got an object called “Cube”, I’ve attached a c# script to it with a function like this:

public void blah(string param) {

Debug.Log(param);
}

When I call unitysendmessage however:

UnitySendMessage(“Cube”, “blah”, “some data”);

I get this error message in XCode’s debug log:

“SendMessage: object Cube does not have receiver for function blah!”

Is there something wrong with my function signature? The docs only show how it should look for js, not c#.

Nevermind, I got it working. Turns out, Unity wasn’t updating the scripts in the XCode project. Of course, now that it has, it’s entirely broken my XCode project so I can’t compile anymore. But that’s a whole other thread entirely. :slight_smile: