I’m a beginner trying to learn Unity. I am currently doing the Unity Essentials pathway.
After uploading my WebGL project to Unity Play, I’ve noticed that the 3D audio is not working as intended. The audio just plays as if it is 2D.
It runs fine when testing the project in the Unity Editor. I’ve also tried building the project as an .exe and it also runs as intended there. However, these issues only arise when testing the game on the Unity Play website. Is there any solution to this?
(edit: there’s a short explanation here: Audio is not behaving as 3d in WebGL . This seems like an important drawback to using Unity for webGL development. Hopefully there will be a fix for this someday…
It seems that other devs only have issues with spatial audio on VideoPlayer objects, but not on other audio sources… I have this issue with the 3D audio on the Unity Essentials tutorial in the Kitchen Audio scene, on the webGL build.)
Edit: This is about an older version of Unity, but it seems that AudioMixer features aren’t supported: Unity - Manual: Using Audio In WebGL . This could explain the issues with the tutorial scene. (if someone could confirm this, let us know please)
Here are some tips about implementing spatial audio in webGL: Mixing positional audio and WebGL | Articles | web.dev .
Just a bit strange that the (basic) audio tutorial doesn’t really work in webGL. It would be nice to have a notice about this on the tutorial pages…
Hi, it doesn’t work in Chrome, Firefox or Edge. Maybe it has to do with how it’s implemented in the tutorial? It’s the Audio Essentials portion of the Unity Essentials pathway below.
Same issue too on Unity 6000.0.25f1
Windows Build and Editor versions plays fine but on the Web build it does not work the 3D spatialization of the Video Player’s linked Audio Source