Passing 'null' as parameter to SendMessage/BroadcastMessage

Is it not possible to use `null` as the parameter for `SendMessage/BroadcastMessage`?

When I try to pass `null` I get the error 'Failed to call function SetSelectedNode of class PLC_Base. Calling function SetSelectedNode with no parameters but the function requires 1'

The use case is the situation where I am selecting a node from a set of nodes and the parameter is the `GameObject` of the node to be selected. Passing `null` should result in no node being selected.

I know there are a number of workarounds: - passing a dummy value that is no node's `gameObject` instead of `null` - overloading SetSelectedNode such that `SetSelectedNode()` calls `SetSelectedNode(null)` - passing an object with one field, that being the node to be selected

But these are all subpar compared to being able to use `SendMessage/BroadcastMessage` properly.

It looks like you simply cannot send “null” as a parameter.

Example,

http://forum.unity3d.com/threads/sendmessage-will-null-as-value-method-not.66756/

It’s really silly - but there it is.

If sending a string, send "". It's = to null... If you're passing a number, pass a negative number, and check it in the place where the number is accepted and handle it accordingly... Same with other datatypes... Good luck!