- Home /
What happens with the receiver when the same event is trigger from multiple instances at the same time?
I have a class named Unit that when some condition is met fires an event. This class (component) is attached to many gameObjects and sometimes the event is triggered (I don't know the proper if trigger is the right word) in many of this game objects at the same time. How does the reciever get this events.. it seems that the reciever properly get the two or three events, but the arguments that it should get are messed up (it gets three times the same arguments, the gameObject raising the event, in my case). Any Ideas how to avoid this??
We cannot help with such issues without seeing code. Please properly format any code with the 101010 button.
The words event, trigger, and receiver have a very particular meaning in program$$anonymous$$g; we can't tell whether you're using them correctly without seeing code.
Note that Send$$anonymous$$essaage and Broadcast$$anonymous$$essage are not intended to be used as a replacement for a true delegate-based event system. They are occasionally convenient I suppose, but I personally do not use them.