GameDev problem: the music in our WebGL game on itch.io won't start until the user clicks in the window. Unity claims this is a browser limitation (no autoplay):
https://docs.unity3d.com/Manual/webgl-audio.html
... but the user has *already* clicked to load and launch the game, so it seems there should be no reason to require another click. I know I've seen WebGL games on itch that don't have this problem.
Does anyone know a workaround?
#GameDev #GameJam #unity #unity3d #itch #audio #sound #music #WebGL
@raptor85 Do you know what the workaround is?
@raptor85 I don't know about the loader; webdev is not my area of expertise.
We could add another layer of title screen, but I've seen other games where music is playing on the first WebGL screen, so there must be a way to do it.
@peterdrake is the unity loader editable? you might be able to have that part auto-load and have a clickthrough on the game itself. I don't develop with unity myself I'm just going off how it webgl works in general (I've done some c++/emscripten ports)
Otherwise I'd just have a splash to click to go to the menu, that's what most unity games seem to do on web.