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 AlexV03 · Dec 22, 2020 at 01:47 PM · audiosoundsoundssound effects

Can't play multiple sounds at once

I made some fireworks and when i shoot 1 firework it makes a sound when it explodes but when i shoot 10+ fireworks and it explodes there is no sound or sound is really bad. Why is that? and i have multiple audio sources.

Comment
Add comment · Show 4
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 Llama_w_2Ls · Dec 22, 2020 at 04:34 PM 0
Share

Try using AudioSource.PlayOneShot(). Documentation here


AudioSource.PlayOneShot does not cancel clips that are already being played by AudioSource.PlayOneShot and AudioSource.Play

@$$anonymous$$V03

avatar image AlexV03 · Dec 23, 2020 at 12:36 PM 0
Share

@Llama_w_2Ls i have PlayOneShot but the problem is that if i shoot multiple fireworks the sound just stop even if all the fireworks have there own audio source.

avatar image Llama_w_2Ls AlexV03 · Dec 23, 2020 at 06:54 PM 0
Share

How are you playing the sound on the fireworks? (script). I used a script to do something similar and it works fine. @$$anonymous$$V03

avatar image AlexV03 Llama_w_2Ls · Dec 24, 2020 at 02:24 PM 0
Share

I did some test and when i don't use the firework script the audio works so i think its in my firework script. I will try to fix it. Still thx for helping.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by logicandchaos · Dec 23, 2020 at 08:06 PM

Look into sound managers, there a re a few free ones on the asset store.

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 AlexV03 · Dec 24, 2020 at 02:28 PM 0
Share

@logicandchaos i did but they don't have what i want. I need when you ignite the firework it plays a sound and when it explodes in they air it also needs to make a sound but only when the effect also plays.

avatar image logicandchaos AlexV03 · Dec 25, 2020 at 12:51 PM 0
Share

What do you mean they don't have what you want? All the sound manager does is allows you to play multiple sounds at once. You still need to code it to play a sound when you want it to. When you ignite the fireworks you just add in a line like Sound$$anonymous$$anager.Instance.Play(FireworksSound);

avatar image
0

Answer by CmdrZin · Dec 25, 2020 at 07:29 PM

see https://docs.unity3d.com/Manual/AudioMixer.html
"The Unity Audio Mixer allows you to mix various audio sources ..."

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

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

148 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

Related Questions

Button doesn't play sound after different button press 0 Answers

Accessing multiple audio devices 1 Answer

TOD script editing (sounds) 0 Answers

How to make sound effects ??? 2 Answers

Audio not coming out of speakers 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