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
1
Question by Mz3D · Nov 13, 2012 at 09:09 AM · 3dsoundlevelrestartsounds

3d sounds don't work anymore when level is restarted

This is strange. I have 3d sounds on my scene (66 in total). Everything works fine the the first time the level is played but then, if i push the button to restart the level, this time not every 3d sound works, only some of them work! why this happens?

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 fafase · Nov 13, 2012 at 09:11 AM 0
Share

You would have to give more details. Are you restarting or reloading the scene? Restarting means you simply reposition some objects at initial position, reloading means you use Application.LoadLevel(); so everything goes back to 0.

avatar image Mz3D · Nov 13, 2012 at 09:16 AM 0
Share

i use Application.LoadLevel()

avatar image AlucardJay · Nov 13, 2012 at 09:58 AM 0
Share

Is this an issue to do with having more than 32 Audio Sources in the scene?

1 Reply

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

Answer by Mz3D · Nov 13, 2012 at 10:12 AM

I solved the problem: the issue was that the audio sources were set on "Play on awake" and the objects were instantiated inside the awake function, so i moved the object creation in the start function and now everything works.

Comment
Add comment · Show 2 · 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 AlucardJay · Nov 13, 2012 at 10:16 AM 2
Share

You beat me to it. I just found the information I was looking for to clarify my comment, and you are correct. Unity can only play 32 audioSources at one time, so if you loaded the scene and all were set to PlayOnAwake, yes the problem you had would occur. Well done on fixing it !

When you force a stereo audio clip to mono, it sums the channels. It doesn’t just pick the left or right one. Unity has a set limit of 32 audio sources that can be playing simultaneously. When the game exceeds this number, audio sources with lower priority will still play on in virtual channels. This way, when the sound comes back in it will start at the point in the audio clip it would be at as if it were never muted. If you are using Unity pro, you can use the profiler. It has an audio tab that will show you how close you are to the 32 source limit and will show you how much memory/cpu audio is using.

Source : http://www.gameaudio101.com/Unity-Audio-Tips.php

Happy Coding =]

avatar image Mz3D · Nov 13, 2012 at 10:53 AM 0
Share

thanks! :)

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

11 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

Related Questions

Sound only plays once 1 Answer

Playing music while scenes change? 4 Answers

Audio not coming out of speakers 1 Answer

How can I make my enemy detect and Run towards sound? 1 Answer

3D level generator on a grid C# 1 Answer


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