If you don’t already know about it, you can test this with just 1 class:

void Awake () {
    optionalArguments("this will print");
    SendMessage("optionalArguments", "this won't print");
}
void optionalArguments () { optionalArguments("it will print this instead"); }
void optionalArguments (string str) {
    print(str);
}

Why? Any good fix for this?

Hello,

SendMessage uses .NET “reflection” to find which method to call. It does not distinguish between overloaded methods and just calls the first one found.

If you wanted to, you could write your own SendMessage that takes into account parameters and types. You could also make it take more than one parameter as well as return a value.

Hope this helps,
Benproductions1

Unity priorize method with no arguments.

To complement Ben’s answer…

If you declare the one with argument first, it will probably call that instead of the empty arguments one.

Unfortunately there is no good solution for that.

One simple thing you can do there is creating a single receiver method for each SendMessage:

void Awake () {
    optionalArguments("this will print");
    SendMessage("SM1_optionalArguments", "this will print just fine too");
}
void optionalArguments () { optionalArguments("this won't print anymore"); }
void SM1_optionalArguments (string str) { optionalArguments(str); }
void optionalArguments (string str) {
    print(str);
}