Code-spawned sounds destroyed with no OnAudioFinished
I'm spawning sounds in c++ and keeping the pointer to them in order to add effects to them later. I also register an OnAudioFinished callback to destroy the sounds once they're finished and remove their pointer from the list.
At some point in the game, I want to stop and destroy all of the sounds. This usually works with no problem, but very rarely, one of my sound pointers is invalid, while still being non-null, meaning that I never got the OnAudioFinished callback.
I've tried many things to try to work around it, but nothing works. I've made sure I wasn't destroying sounds any other way, the code is pretty straightforward. Has anyone ever had this issue or something similar?
asked Jul 13 '19 at 09:40 PM in C++ Programming
Okay, could you try switching your struct to a USTRUCT() and the pointer to the sound to a UPROPERTY() and try again?
answered Jul 15 '19 at 06:54 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here