What is a delegate?

Ben says, remember to put the &, because thats what you do when dealing with delegates. I have heard this term since a few lectures ago, but I am not sure what it means, maybe I missed something?
What is a delegate?
Unreals Documentation is just confusing me even more with the DECLARE_DELEGATE(DelegateName)

I would be very happy about some kind of easy explanation :slight_smile:

Data types that reference and execute member functions on C++ Objects

- From the docs


GetWorld()->GetTimerManager().SetTimer(Timer, this, &AProjectile::OnTimerExpire, DestroyDelay, false);

Here the third argument (&AProjectile::OnTimerExpire) is the member function to call on the second arguent (this).

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms