- Home /
How to handle multiples instances of an object raising the same event?
In my hypothetical situation, i have a scene with some dynamic instantiated copys of the same object and each of then raising a public event that is called when they are destroyed. Something in the lines of :
public event Action OnImpact;
The behavior expected would be to increase the score when any of then notify being destroyed. For the sake of experimenting i don't want then subscribing to an event, but make a single other object subscribe/listen to the event they raise.
What may be the possible approaches?
Your answer
Follow this Question
Related Questions
Correct way to send an event to a specific enemy 0 Answers
EventTrigger / EventListener (what's the difference?) 0 Answers
Setting up EventTrigger programmatically for GameObject throws NullReferenceException 0 Answers
Animation Event not working properly 0 Answers
How to change target of UnityEvent 3 Answers