[Plugin] Global Event System

Thankyou very much for your awesome plugin.
But I found an issue when implement this plugin to my project.
When I play game in UE editor, if I press stop (red square) button to stop my game. Some time the listeners in EventMap is not cleared, and when I replay the game, if the emit called it will check the old listener and make editor crash.
Reproduce steps:

  • Try start game, listen to and event and stop game.
  • Repeat about steps time many and when you emit event, the editor will crash it line 485 file GESHandler.cpp if (!Listener.ReceiverWCO->IsValidLowLevelFast()).

When show debug, I can see the event map have about 10 listeners of that event but I only have 2 object bind to that event. All other listeners is from previous sessions.

I tried call GESUnbind in object’s EndPlay and Destoryed events, but the issue is not fixed.

For now, I avoid the issue by I added a Reset function to clear GES’s EventMap in GameInstance::Shutdown event and it work for my project.

Hope you have time to fix the issue permanently.
Thank you a lot.