I’ve only started working with delegates recently, so I’m not sure if I understand the full extent of their uses. Anyways, usually when I need to bind a function to a delegate, I need a reference to the object. For example, if I wanted my gamemode to do something when any enemy is killed, I have to have a reference to the enemy to bind to the delegate.
I don’t know if my wording makes sense here, but is there a way to bind to a delegate without a reference to an existing instance? I want OnEnemyKilled to be called when any enemy dies without having to make sure my bind gets added anytime an enemy spawns.
You could reverse the situation and bind all enemies to a delegate inside of an enemy manager, that would do actions according with their deaths (add points, xp etc)
The OnKilled delegate is called by the object, unless you declare it static static FOnKilled OnKilled, then you need 1 parameter on the delegate to tell which enemy is killed