I have a sound object in my scene because I want the volume to get louder depending on the how near the player is, that's all working. I have added the Remember Sound component:
https://1drv.ms/u/s!Amz_vh8OYDX3u8IQ8SyTzE8rntAMLQ?e=Al8EJJ
Here's how I play the sound:
https://1drv.ms/u/s!Amz_vh8OYDX3u8IRrv7CeqBihJADhg?e=kzApOJ
The problem is that the looping sound isn't playing if I save and then load the saved game. I tried with both mp3 and wav - same issue. I'm using the SaveableData method and have put the audio clip in SaveableData/Audio.
If I specify the sound in the sound object, it's playing when I switch between players (in different scenes), but not on load.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
AC/Unity versions, please.
Can't recreate. Open up Sound.cs, and find the LoadData function. Just after the line:
paste the following:
What shows up in the Console upon loading?
AC: 1.68.4
Unity: 2019.2.2f1
It doesn't enter that debug statement, if (soundData.isPlaying) evaluates to false.
What I do is:
1. Play the action list that starts the sound
2. Save
3. Load
Here's a repro (it noticed that it stopped working once I added the SavebleData folders):
https://1drv.ms/u/s!Amz_vh8OYDX3u8Jl2CbuknSy7cA8dw?e=VXZgjG
Isn't this the same problem I had. Isssue if using Unity 2018. Chris found a solution.
https://adventurecreator.org/forum/discussion/9006/sfx-not-remembering-it-is-playing-after-loading-save-game#latest
Yes, this is a duplication - a fix will be included in v1.69.0.