Комментарии:
My only problem with this was that it only works in the current scene, if you load the next level which is in the next scene the new scene doesn't have access to the volume control of the first scene.
ОтветитьHey Jason, Thanks for the great video. For some reason the audio mixer doesn't seem to work on android devices for some reason. Slider works perfectly fine in the editor but when I build to android sliders don't do anything. Have you had this issue as well?
ОтветитьYou said we could download the code and the images but there isn't a way to do it. :(
ОтветитьAwesome video, wonder tho how to keep the slider and audiomixer data throughout the scenes, so you can adjust them lets sayin the gameplay scene, and even after gameover and returnin to menu, or does audio mixer do this already in itself so no need to twiddle with DontDestroyOnLoad and such?
Atm have ton of sounds in a audiomanager script, realized tho all those audios are played from that manager so if I add enemy sounds to it the won't be coming from the enemies even tho I call the sound from the enemy script. probably have to make separate script and audio source for the enemies. Tho there prob is a better way I just don't see/know of.
Atm I control mastervolume with audiolistener.volume in the main menu with a slider, the value seems to persist throughout the scenes but having problems adding that same slider to other scenes and make it so they remember the value, prob have to do add that PlayerPrefs script you did to save the data.
This can also be tweaked to be used with Binary/JSON data storage as well :) Thx!
ОтветитьYeah - so right. And the same applies to films nowadays too - dialogue is low, and background music is feckin deafening! One of my pet hates. And I ALWAYS include these controls in a game.
Ответитьvery cool video. very nice. good job.
ОтветитьThanks Jason, great video. Question: I have changed the min and max values for the slider to match those from the mixer master volume, this way seems way easier to me. Any reason you didn't do it this way? Or it is just a matter of a prefference?
ОтветитьTupac Shakur 😎
ОтветитьThank you so much for this tutorial!!
ОтветитьWhy does _mixer.SetFloat(_volumeParameter, -infinity) result in your mixer going to -80 (mute) but mine resets it to 0? oO newer unity versions? slider val 0 passed into mathf.log10() seems to be -inf
ОтветитьWow! That was incredible !
ОтветитьI have run into a problem, when I load my settings menu, put a value to 0.0001 and then load out and back in to the settings menu, I cant change the volume at all. any ideas?
ОтветитьThere is a bug with setting the mixer using the value * multiplier. When the slider is at 0, the multiplier is at 0, which means the value is not being changed, and so the mixer goes back to full volume.
UPDATE
I realised my min value was set to 0, and not 0.001. I didn't see you change that in the video. Either way it's working now. Thanks for the tutorial.
Now I'm gonna go and save the volume values in a scriptable object to persist and save to a save file.
Where is the code and where is the graphics for the mixer button?
ОтветитьI just learned how to remove all the haskkey references I've been using lol.
ОтветитьHoly smokes Jason, your able to code things and explain them so fast it scares me 😅😅 you saved to player prefs under a minute IN A TUTORIAL
ОтветитьFMOD Video?
ОтветитьGreat, thanks for the tutorial! 1 question though, why use the AddListener method inside the script, when you can use the OnChangedValue method from the slider itself in the inspector?
Ответить