How can I program SendMessage() with a receiver in C#?
In JS I can use in one object SendMessage like(“nameOfReceiverfunction”, true);
and in the receiving object:
function nameOfReceiverfunction (on: bool)
{
//do what you need with this message
}
How do I achieve the same in C#? (I know I can use GetComponent(), but I would like to really use SendMessage. Do I need delegates? .NET event handling?
Thanks for your answer.