Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by Bwhang · Nov 04, 2016 at 10:25 AM · musicvolume

My music volume slowly gets louder until a SFX is played

I'm a newbie using Javascript in Unity 5.4.1. If I set the volume of my music to be very quiet (but not off), when I start the next level, the music will slowly get louder if I don't move my character (rolling ball).

As soon as I hit an object with the ball, the music volume drops back down - as if having a sfx play will cause the music to drop back down.

My AudioSource is set to 2D. My listener is on my Main Camera. Here's a snapshot of the inspector on my music.alt text

This problem does not occur if I set the music volume to off.

inspector.jpg (50.2 kB)
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 Cynikal ♦ · Nov 04, 2016 at 10:28 AM 0
Share

When you play the scene, do you see the Volume slider move up on its own? or does the slider stay the same, just the sound itself is getting louder?

avatar image Zodiarc · Nov 04, 2016 at 10:30 AM 0
Share

What I don't understand here: Do you actually manipulate the music volume somehow through code or is it doing this by itself?

avatar image Bwhang Zodiarc · Nov 05, 2016 at 09:21 AM 0
Share

The problem was occurring by itself. I don't have any code that adjusts the music volume.

It didn't occur to me to turn on the slider (normally it's hidden). After reading Cynikal's comment, I turned on the slider. Unfortunately (or maybe fortunately), I can't repeat this bug anymore. Late last night (after asking the question), I went thru all my levels and reconnected my music audiosource to the game object with the slider.

$$anonymous$$aybe that fixed the problem since I can't get to happen now. If it does happen again, I'll definitely turn on the slider and see if it moves.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Bwhang · Nov 05, 2016 at 09:21 AM

The problem was occurring by itself. I don't have any code that adjusts the music volume.

It didn't occur to me to turn on the slider (normally it's hidden). After reading Cynikal's comment, I turned on the slider. Unfortunately (or maybe fortunately), I can't repeat this bug anymore. Late last night (after asking the question), I went thru all my levels and reconnected my music audiosource to the game object with the slider.

Maybe that fixed the problem since I can't get to happen now. If it does happen again, I'll definitely turn on the slider and see if it moves.

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

77 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

Related Questions

How to control Music vs SFX vol using Master Mixer 0 Answers

I am making a 2D platform game. I use the following script to respawn a player when he dies. I want to delay the level being reloaded by about 2 seconds, so the death sound can play. It is respawning too fast. I'm a newbie. any help will be appreciated. 1 Answer

Audio Mixer and AudioClip 0 Answers

One Song plays but the other does not? 0 Answers

My code generated Metronome gets out of sync with the audio source metronome. 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