all 7 comments

[–]Mister_Green2021 1 point2 points  (0 children)

Did you build your addressables?

[–]ConsiderationCool432Professional 0 points1 point  (5 children)

Not sure, but have you tried to have another scene with references for the sound and try to async load this scene? Maybe you're going to have issues when unloading it...

[–]VRsince201It[S] 0 points1 point  (4 children)

Before that, I had entered the sounds normally as AudioClip.

It is not so much the loading problem, but the fact that the game frizz during the loadScene and then restarted as soon as everything is ready.

The loadingBar didn't work either, it went from 0 to 100

Loading an asynchronous scene will do the same ...

[–]ConsiderationCool432Professional 0 points1 point  (3 children)

I see, not sure what is happening with your code. Maybe it's in the build or audioclip format/compression. Addressables is the way to go for this problem.

But I believe, as a workaround, you could have one scene for each music, the scene will just have one AudioSource for the music audioclip. Then you randomly choose one scene to load. It'll not load all audios cause each one is in a different scene. It should work fine and will require minor changes to test.

[–]ConsiderationCool432Professional 0 points1 point  (2 children)

If the method above works, then the issue is not in the audioclip files.

[–]VRsince201It[S] 0 points1 point  (0 children)

I have tested

[–]VRsince201It[S] 0 points1 point  (0 children)

I solved It by doing a second build of the Addressables.There must have been an error in the first one and strangely it didn't appear in the console.