- Home /
Question by
NeatWolf · Jan 22, 2017 at 08:55 PM ·
sendmessageparent and childbroadcastmessagesend messagesender
How can I Broadcast a message on a GameObject and also send the message Upwards natively without sending twice the message on the target base object?
Hi,
we've got at least 3 functions to send a message to a GameObject:
SendMessage (self only)
BroadcastMessage (self + children)
SendMessageUpwards(self + ancestors)
I'm looking for a native function to do send a message to self+children+ancestors without duplicating the message on self.
Do I need to iterate manually either on children or parents (probably the simpler implementation), or is there a way to exclude self from the Broadcast or Upwards methods?
A solution about 5 max commands in total, more stylish than iterating or using recursion?
Comment