Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by CrossGuard-Games · Jul 10, 2021 at 07:09 PM · buildaudiowebglaudiosourcebuilding

How can I get my audio files to work for WEBGL build?

As soon as I switch over to WEBGL build all my audio files lose the option to preview, cannot be dragged into an Audioclip box and when I run game no sound plays at all, not in my editor or in the final build. I have tried bringing in .ogg, .wav and .mp3 and they all do the exact same error mentioned above. I see other unity games with sound so I know it must be possible. tried checking "override for WEBGL" in import settings which removes error message but does not fix the problem. Running Unity 2021 but same problem with 2019. Any help greatly appreciated, thanks!! alt text

unity-audio-problem.jpg (331.1 kB)
Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Zottic · Jul 10, 2021 at 08:07 PM 0
Share

This might help: https://docs.unity3d.com/Manual/webgl-audio.html

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by CrossGuard-Games · Jul 14, 2021 at 08:46 PM

finally got it fixed! I followed the steps in answer below then restarted Unity

https://answers.unity.com/questions/243379/why-cant-i-hear-my-audio.html#:~:text=Close%20all%20programs%20that%20use,click%20%2D%3E%20Restart%20the%20service.

And in between restarting I changed my music files open with preference from 'groove music' to 'windows media player' then re-dragged in sound. I figure following steps from above link is what did it but might as well mention the second action as I'm not sure which one fixed it.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by rh_galaxy · Jul 10, 2021 at 08:29 PM

I have a webgl project where sound is working so it should be able to work.

It's like the metadata files are gone or something. Check your folder where you keep the sounds (Assets/Sound). Maybe regenerate the import settings by emptying that folder and copy the sound files there again.

Attaching images from my project and it directly recognize the sound files and build icons for them. Maybe it can help you.alt textalt text


sound-webgl-metadata.jpg (41.2 kB)
sound-webgl.jpg (188.1 kB)
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image CrossGuard-Games · Jul 10, 2021 at 10:30 PM 0
Share

Hey, thanks for taking the time! I tired making a brand new scene and dragging in a fresh audio file in unity 2021, still the same issue. I assume this would have fixed the issue you were mentioning. The only thing I can think of currently is that the computer I'm using is less than adequate for working with Unity. That's really the only thing I can come up with right now. Thanks again for your response though, at least now I feel confident that it can be done XD

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

171 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Questions about building game 2 Answers

Audio Gets Distorted in Android Build 0 Answers

WebGl build keeps failing 0 Answers

Audio in WEBGL on IOS devices -1 Answers

Single AudioSource "Ran out of virtual channels" WebGL 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges