1
\$\begingroup\$

I wish to broadcast a message from one object to it's parent and it's siblings. I am aware that unity does not support broadcasting a message to all other game objects but is there a way to broadcast to parent and siblings?

I am using Unity 5.

\$\endgroup\$
2
\$\begingroup\$

First off, are you aware of the command BroadcastMessage? It's not quite what you are asking for, but it's close and it happens to be named the exact terms you used. That command sends a message to all children, not siblings, but that means it will message all siblings if you use that command on the parent. So write something like: transform.parent.BroadcastMessage("FunctionName");

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.