So I’m just in the process of cleaning up my blockbreaker before sharing it with the world and wanted to add some additional sfx to make the game seem a bit more professional. So there are 3 sounds I want to implement that are causing me trouble as they are destroyed before they can finish playing.
- A sound when the ‘Start’ button is pressed,
- A sound when the ball hits the lose collider, and
- A sound when the player clears the level.
Each of these occur just before a new scene is loaded, thus destroying them and cutting the sound short.
I have tried to use the DontDestroyOnLoad()
command in various iterations, but cannot get it to work. Does anyone know the correct way of doing this?
~Thom