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 Pablouh · Aug 13, 2014 at 01:17 PM · audioaudioplay

Sound plays even though Play On Awake is unticked

Hi guys,

I have a weird problem where a newly added sound plays at the start of the game even though Play On Awake is unticked. Also I added a line in the Start()-function in my script "audioSystem.sound.Stop()" if that would help, but no such luck.

Google didn't help with this issue, or maybe I didn't use the right search terms. Can anyone help me?

Comment
Add comment · Show 3
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 smoggach · Aug 13, 2014 at 01:22 PM 0
Share

Is this happening on the device or in the editor as well? I've seen a bug like this on ipads that I've yet to figure out.

avatar image Pablouh · Aug 14, 2014 at 10:27 AM 0
Share

I haven't tested on the device yet, but the web player build has the same problem.

avatar image tanerismail12345 · Jan 09 at 04:17 PM 0
Share

Hi there, does anybody know an efficient fix for this?

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Pablouh · Aug 14, 2014 at 11:39 AM

Well finally I got rid of the sound playing at the start. I just removed the sound file from the project and re-added it. Some kind of weird bug was going on there. Thanks for your help, guys :)

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 AlanGreyjoy · Apr 19, 2015 at 05:07 AM 0
Share

I agree with this. Bug is still in unity 5

avatar image
0

Answer by gamlin777 · Aug 13, 2014 at 10:17 PM

  1. Make sure there are no other instances of the object in the scene.

  2. Check to see if the object is enabled (ticked) at runtime.

  3. Comment out all audioSystem.sound.Play() in your scripts, then enable the one by one to see if a function with .Play() inside is being called prematurely.

Sorry for the vague answers, it's all I got with the information provided. Good luck :)

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 Pablouh · Aug 14, 2014 at 12:52 PM 0
Share

I triple checked - there are no other instances of the object in the scene.

I'm not sure what you mean by ticked at runtime.. When running the game the "sound.enabled = true". If I make it "false" in the Start()-function it doesn't stop the sound from playing.

Commenting out all the sound.Play() lines in the game doesn't stop the sound from playing.

Thanks for your answer!

avatar image
0

Answer by SwissCore · Jul 14, 2018 at 01:25 PM

I know, this is an old Thread, but I have the same issue in my Project (Unity 2018.2), re-adding the Audio-clip did not solve the problem for me. The audiosource.Play() function is only called when a UI button is clicked, which is not the case at start of the game. If I disable the audio source the sound does not play, so its that audio source which gets triggered at start. Any ideas?

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 SwissCore · Jul 14, 2018 at 01:54 PM 1
Share

Solved it but not in a very clean way. disabled Audiosource on Awake and invoke an enable function with a delay of 0.15f. Works, but is not the best way. I hope somebody come up with a cleaner way to solve it.

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

7 People are following this question.

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

Related Questions

Audio group problem at standalone 0 Answers

How to make audio not playing repeatedly? 1 Answer

How to stop audio 1 Answer

Quadruple audio fade script not working completely. Shocker. 0 Answers

How do I play audio source on Maximize on Play / Audio Source wont play on Maximize 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