|
I'm trying to overload a method... something like: function Blah () { Debug.Log("Do Something"); } function Blah (string : String) { Debug.Log("Do Something and using that String"); } and I'm calling as: SendMessage ("Blah"); SendMessage ("Blah", "Hello"); If I put Blah() in first place at my code, I receive two "Do Something" message. But if I put Blah(string:String) in first place, I receive one "Do Something and using that String" and one error: missing 1 argument. What's happening? SendMessage don't support overloaded methods or I missed something?
(comments are locked)
|
|
Quick solution: you will always have to provide a hashtable as an argument, but just use emptyHash = new Hashtable();
(comments are locked)
|

I've recently been trying this too. Going to have to assume yes, SendMessage does not support overloads. Whats strange to me however, is that it would choose to use the function that requires an argument over the function that does not... maybe it's something to do with SendMessage only supporting 1 argument.