Timeline for How to play sound in WebGL build in Unity?
Current License: CC BY-SA 4.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 21, 2021 at 16:48 | vote | accept | xcrypt | ||
| Mar 21, 2021 at 14:35 | vote | accept | xcrypt | ||
| Mar 21, 2021 at 14:35 | |||||
| Mar 21, 2021 at 14:35 | answer | added | xcrypt | timeline score: 1 | |
| Mar 18, 2021 at 11:47 | comment | added | xcrypt | Not doing WebGL is not an option as I've made this project from the beginning knowing that we were gonna support WebGL. Just hope I can find a fix for the audio. | |
| Mar 18, 2021 at 8:08 | comment | added | Nikaas | I have the same problem. It is related to browsers not initializing audio if there is no mouse interaction (it is made to prevent annoying sound adds). If you spam the mouse button while the Unity logo is displayed you will see in the browser log that then the audio module is loaded (otherwise there is error log for no audio module). That fixes it for some users but for me still no sound. I agree with Evorlor and I dont bother with WebGL anymore, too many problems and unexplainable performance drops on half the machines tried. | |
| Mar 17, 2021 at 18:30 | comment | added | Evorlor♦ | Step 1. Don't build for WebGL. There is no step 2. (I have decent experience with WebGL + Unity, and have come to the conclusion that it is not worth it.) | |
| Mar 17, 2021 at 15:04 | history | edited | xcrypt | CC BY-SA 4.0 | added 25 characters in body |
| Mar 17, 2021 at 14:51 | comment | added | xcrypt | @DMGregory like this? | |
| Mar 17, 2021 at 14:50 | history | edited | xcrypt | CC BY-SA 4.0 | added 325 characters in body |
| Mar 17, 2021 at 13:09 | comment | added | DMGregory♦ | I've never experienced any specific difficulties playing audio in a WebGL build - every time I've tried it, it "just works," the same as on desktop. Can you edit your question to include a Minimal Complete Verifiable Example, walking us through all the steps to reproduce the problem in a new, empty project? This should include the exact encoding of your source assets, how you've imported them into your project, and the script that is playing them. | |
| Mar 17, 2021 at 12:50 | history | asked | xcrypt | CC BY-SA 4.0 |