How to communicate back to the spawner class

I have a spawner class that spawns AI in a level. The Spawner tracks the amount of AI and adds them to a set.
However, when the AI is killed, I don’t know how to communicate to the spawner that spawned the AI to tell the spawner that it died.

Does anyone know how to communicate back to the class that spawned in the AI?

When you spawn the AI pass a reference of the spawner to the AI. Then they AI can callback to the spawner via an event.

1 Like

when spawning set the spawner as the owner of the spawned actor. that way you just use get owner and done

1 Like

So that’s what that’s for? Learn something new every day.