Closed reisandbeans closed 1 year ago
Can confirm that this PR is working. Before UE (5.1 in my case) crashed on fast restarts within the editor with multiple listeners. The old references of listeners were not cleaned up propertly as the GESWorldListenerActor which is responsible for the cleanup does not exist right at the beginning it takes some time to spawn. So If the application is closed before this actor exists the listeners do not get cleaned up leading to crashes within the UE-Editor "Play of selected Viewport", because the GES Plugin still keeps this references over the restarts of the game within the UE-Editor. With this version its not crashing and working as expected.
Thanks for the detailed response. I want to probably refactor some of the logic to use a world subsystem instead, but this is a good backup either way it seems.
Interesting approach, I wonder if the begin pie lambda gets called before other e.g. actor begin play calls? If so that small change might be enough. Have you tested this with a bunch of listener adds on begin play?