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 Cheesyfishface · Mar 10, 2014 at 03:12 AM · audio clippingaudio priority

Footsteps Sound Effect causing other Audio Clipping or no sound at all.

Hi,

Basically I've got Random Sound Triggers in my game that when the player walks on them, the game will play sounds as referenced via a script - it all worked fine. But then I added Footsteps sound effects into the game, now the Footsteps dominate the audio in the game with their sound file often cutting off the Random Sound Triggers audio or with the player entering the Random Sound Trigger and no sound from it being played.

Does anyone have any suggestions? I think it may have something to do with the priority of the sounds however I don't know what I'm doing with that. Does anyone know of a tutorial that deals with multiple sound files in a game or can offer general advise?

Thanks in advance.

Comment
Add comment · Show 2
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 suribe · Mar 10, 2014 at 12:00 PM 0
Share

Are you using only one AudioSource?

avatar image Cheesyfishface · Mar 10, 2014 at 01:26 PM 0
Share

I was before but since this post I've added multiple ones and have changed the priorities of the sounds but I still am getting some cut-offs.

I think it might be something to do with the Footstep script as the Random Sound Triggers work when the Player is Sprinting but not while the Footsteps are playing and the Footsteps sound effect has the lowest priority in my scene.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by CyaBB · Sep 29, 2017 at 12:45 PM

After some research i read that you need the same amount of audio sources as amount of clips you want to play. So i added 4 audiosources to my script and played every single clip on a different audio source.

 private AudioSource[] source;
 source = GetComponents<AudioSource>();
 
 source[1].PlayOneShot(gunshot, vol);
 source[2].PlayOneShot(swordSlash, vol);
 source[3].PlayOneShot(bloodyHit, vol);

Like this. It fixed it and worked very well. The FPSController is default using the first audio source which is attached on default to the FPSController.

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

22 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

Related Questions

Audio Sounds Blurring Together 0 Answers

Play audio clip on more than one object from another gameobject 2 Answers

Dynamic Sound: Wind up Wind down Audio 1 Answer

Help adjusting Audio script settings to a specific sound 0 Answers

Sounds distance issue. 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