Why do callbacks use delegates instead of events?

Hello again, this callback found in the Seeker class seems to be the only way to get updates when any path completes:

Is there a reason why it’s a delegate and not an event? With an event, multiple sources could subscribe to it, but as a delegate it can only be set once:

seeker.pathCallback = (Pathfinding.Path p) => path = p.vectorPath;

Hi

You can subscribe multiple time to a delegate as well.
However, in any case I really discourage this. It leads to very brittle code. The only reason that field is there is for backwards compatibility. Instead I recommend that you only use the path callback on the seeker.StartPath method.

See also https://arongranberg.com/astar/docs/callingpathfinding.html