Unity AUDIO Volume Settings Menu Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024
  • In this Audio Manager Tutorial We'll create Music and SFX Volume Slider.
    And We'll learn how control Audio Mixer with the volume slider.
    We'll SAVE Player's Volume Settings Preferences.
    Enjoy the video ☕
    ----------------------------
    🖐 Hi Game developer
    Welcome to Rehope Games I'm Murat
    I share unity tutorial videos on my channel. if you want to make a game with unity (especially 2d platformer game), the videos here will definitely interest you.
    ----------------------------
    #unitytutorials, #unity2d, #unity2dplatformer

ความคิดเห็น • 92

  • @Yensuo
    @Yensuo 10 หลายเดือนก่อน +13

    these are the best unity audio tutorials anyone can find in youtube, i dont understand how you are not getting more views

    • @RehopeGames
      @RehopeGames  10 หลายเดือนก่อน

      Thank you so much for your feedback 🙏
      You're so kind 😊

  • @Dombrix
    @Dombrix 2 หลายเดือนก่อน +1

    4:20 if you don't need to change something there, just set the slider values ​​from -80 to 0, this is a better solution because the log makes an arc in the graph and it does not work very well in places

  • @adeladam2325
    @adeladam2325 ปีที่แล้ว +3

    Thanks so much. Will keep visiting this channel for tips!

  • @Gaming_Adventures_Hub
    @Gaming_Adventures_Hub 3 หลายเดือนก่อน

    This is the only best unity tutorial channel 😍

  • @SmooCoder
    @SmooCoder ปีที่แล้ว +4

    Best Tutorial for Volume Slider

  • @opalstudios
    @opalstudios 10 หลายเดือนก่อน +1

    truly a legend. thanks so much for your tutorials!!

    • @RehopeGames
      @RehopeGames  9 หลายเดือนก่อน

      Thanks for your motivational feedback. 🙏
      I'm glad hear that , I wish you success in your project 😊

  • @DonMhylios
    @DonMhylios 2 หลายเดือนก่อน

    amazing tutorial! just what I needed, thank you so much! ♥

  • @e.furkansengul9877
    @e.furkansengul9877 หลายเดือนก่อน

    Hocam videolarınız gerçekten mükemmel ve öğretici Eliniz sağlık

  • @david_hade3284
    @david_hade3284 หลายเดือนก่อน

    Nice Video thanks!

  • @copitotobby
    @copitotobby 2 หลายเดือนก่อน

    Muchas gracias por la magnifica explicación, entendí muy bien aunque no me quedó muy claro lo de mathf.log, Saludos,

  • @randomstuff691
    @randomstuff691 11 หลายเดือนก่อน +3

    Hi, I hope you would have a video tutorial about that sound and sfx toggle inside the option panel (am I right? the one when user clicks the option button, I hope the toggle would show up there and user will be able to adjust the music and sfx even they are from different scenes)

    • @RehopeGames
      @RehopeGames  11 หลายเดือนก่อน

      Yes You are right sir. I will do it , Thanks 😉

  • @razan_psut
    @razan_psut หลายเดือนก่อน

    8:06 the musicVolume is what controls the saving for the sfx? wont that cause problems? especially if you want to add other audio controls in the future

  • @Serqewjahk
    @Serqewjahk ปีที่แล้ว +3

    Is it normal for the music volume to adjust to the volume of the sound effects when exiting and re-entering the game? And if not, how can it be fixed?

  • @FaKz92
    @FaKz92 6 หลายเดือนก่อน +1

    I did the same, but for some reason it does not change volume.
    Where did you put the Audio Source?
    I did it like in your previous VIdeo in to "AudioManager" -> "Music" -> "AudioSource".
    I also bind the Output to music of the Mixer.
    Please help me...

  • @maddogmccree88
    @maddogmccree88 3 หลายเดือนก่อน +1

    You're a legend! you'll get 50% on my game when it finishes :p

  • @kantallive
    @kantallive 9 หลายเดือนก่อน +1

    Thank you for the video

  • @lexachopyk9531
    @lexachopyk9531 ปีที่แล้ว +2

    Thank you!

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      You're welcome! 😊
      Have a great day! 🌞

  • @G4M1NG
    @G4M1NG ปีที่แล้ว +3

    Hey, first of all thank you for the tutorial. I learned a new lesson in Unity. But I have one issue when I export the game and open it, the volume is set to 0% (it is muted). What should i do that when i’ll open the exported game the audio will be set to 100%?

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      Hello , if you update Start function like this I think you solve this problem
      Please feedback the result 😊
      public class VolumeSettings : MonoBehaviour
      {
      [SerializeField] private AudioMixer myMixer;
      [SerializeField] private Slider musicSlider;
      [SerializeField] private Slider SFXSlider;
      private void Start()
      {
      if (PlayerPrefs.HasKey("musicVolume"))
      {
      LoadVolume();
      }
      else
      {
      PlayerPrefs.SetFloat("SFXVolume", volume);
      PlayerPrefs.SetFloat("musicVolume", volume);
      LoadVolume();
      }
      }

    • @G4M1NG
      @G4M1NG ปีที่แล้ว +2

      @@RehopeGames i was messing around with the slider in the editor and then i remembered that i set it to 0% so that’s why when i built the app it was set to 0% :D setting it to 100% fixed it but thank you for the answer!

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      i guessed that 😊

  • @talismanskulls2857
    @talismanskulls2857 ปีที่แล้ว +2

    Couldn't figure out why mine wasn't working correctly to add other parts like having a main master slider and adding separate setting. I had to break the Has Key down into separate parts.

    • @talismanskulls2857
      @talismanskulls2857 ปีที่แล้ว

      Like this:
      private void Start()
      {
      if (PlayerPrefs.HasKey("MasterVolume"))
      {
      LoadVolume();
      }
      else
      {
      MasterVolume();
      }
      if (PlayerPrefs.HasKey("MusicVolume"))
      {
      LoadVolume();
      }
      else
      {
      MusicVolume();
      }
      if (PlayerPrefs.HasKey("AmbientVolume"))
      {
      LoadVolume();
      }
      else
      {
      AmbientVolume();
      }
      if (PlayerPrefs.HasKey("SFXVolume"))
      {
      LoadVolume();
      }
      else
      {
      SoundFXVolume();
      }
      }

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      👍

  • @mariocucurull7978
    @mariocucurull7978 ปีที่แล้ว +2

    Hey que tal? Buen video. Una pregunta, he intentado implementar varios puntos de carga y en un principio funciona, pero lo que no hace bien es pasar de un punto de carga a otro, me resetea la posicion a la inicial del objeto y luego si puedo llevarlo al nuevo punto de carga. Sabes a que se puede deber? Gracias!

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      Gracias por tu buen comentario. resolviste el problema?

  • @Brai-niac
    @Brai-niac ปีที่แล้ว +2

    Does it work on one scene or all the scenes in your project?

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      Hello ,
      You can create a Prefab from the object and you can easily add the scenes you want.

  • @pinumber745
    @pinumber745 8 หลายเดือนก่อน +2

    i cant save the sound when i exit the game, it turn back to default settings

    • @RehopeGames
      @RehopeGames  8 หลายเดือนก่อน +1

      Did you follow the video step by step?

    • @ch1laxbr0
      @ch1laxbr0 8 หลายเดือนก่อน

      i have the same issue

    • @pinumber745
      @pinumber745 8 หลายเดือนก่อน

      @@RehopeGames yep, every step

  • @makuachigaming431
    @makuachigaming431 2 หลายเดือนก่อน

    how can i have audiomixer file? i only have music that i imported from assets for free.

  • @atrs
    @atrs ปีที่แล้ว

    Hey, ive been following the audio tutorials for my game, and its been working fantastically! One question that i have is that in my game i implemented the volume settings in my main menu scene as well as my game scene, and for some reason the game music will stack ontop even using the other video, which used the "DontDestoryOnLoad" function. Any ideas?

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      did you watch this video th-cam.com/video/xswEpNpucZQ/w-d-xo.html
      maybe you can find solution in this video

    • @atrs
      @atrs ปีที่แล้ว

      @@RehopeGames I used the video and followed it but, it still seems to repeat itself. I'm not sure if having the volume settings in multiple scenes affects anything?

    • @atrs
      @atrs ปีที่แล้ว +1

      Ah. It was an issue on my end. It works perfectly now. Great videos btw!

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      I'm glad that you solved this problem 😊 and thanks 🙏

  • @antsforever1356
    @antsforever1356 9 หลายเดือนก่อน +1

    Hi, I would like to know how to share the the volume between scenes for example if I have it controlling the volume on one scene and I change it to max, I want it to be max if I go to another level.

    • @antsforever1356
      @antsforever1356 9 หลายเดือนก่อน +1

      Another example is that i want the audio to be changed for all the scene love your videos btw supper helpful

    • @antsforever1356
      @antsforever1356 9 หลายเดือนก่อน

      Sorry it was a problem on my end i needed to make sure the Audio sources were connected to the Audio mixer.

    • @RehopeGames
      @RehopeGames  9 หลายเดือนก่อน +1

      Hi, did you finish this series? th-cam.com/play/PLf6aEENFZ4FuL4XSo0rEUgecY7FED8p-I.html

  • @dogmuncher_69
    @dogmuncher_69 6 หลายเดือนก่อน

    if you start the game on a scene which doesnt have the sliders then nothing saves. any fixes?

  • @frankieplayzz8382
    @frankieplayzz8382 5 หลายเดือนก่อน

    does any one else have the problem on the sound not playing and the sliders dont work to lower and raise the volume

  • @meryemaydn8615
    @meryemaydn8615 10 หลายเดือนก่อน

    Hi, when I start to play game, I can't see the object that "DontDestroyOnLoad". I watched your previous video and I did step by step whatever yo did. But can't find when you add this object. Can you help me about this problem? Please :(

    • @RehopeGames
      @RehopeGames  10 หลายเดือนก่อน

      Merhaba Meryem hanım,
      "DontDestroyOnLoad" bir nesneyi sahneler arasında taşımamıza yarayan bir komuttur.
      Sahneler arasında yok olmayan bir nesneniz olduğunda onu hiyerarşi panelinde DontDestroyOnLoad altında görebilirsiniz.
      Bu arada eğer Singleton Patterni daha önce kullanmadıysanız bir göz atmanızı tavsiye ederim.
      Projenizde başarılar 🙏

  • @laughing2882
    @laughing2882 ปีที่แล้ว

    what is audioMixer? I was looking for a way to add music settings to my project and found this video, so I might be missing something.

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      Hi , I explained AudioMixer in this video th-cam.com/video/IxHPzrEq1Tc/w-d-xo.html

  • @aldrichnathanieldevilles9991
    @aldrichnathanieldevilles9991 ปีที่แล้ว

    the code works fine in the play mode but when I export it as an apk for android, the volume adjustments doesn't work. Is there a setting in unity that I must change?

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      Hello, what problem do you have exactly?
      Is the slider not moving or is there no change in volume?

  • @UltraKrillex
    @UltraKrillex 11 หลายเดือนก่อน

    For some reason when I turn the sliders all the way down, the volume gets automatically set to max even though the sliders are down. How do I fix this?

    • @RehopeGames
      @RehopeGames  11 หลายเดือนก่อน

      Doesn't the slider automatically go to the last save level when the game is started?

    • @RehopeGames
      @RehopeGames  11 หลายเดือนก่อน

      Can you show me the script pls

    • @UltraKrillex
      @UltraKrillex 11 หลายเดือนก่อน

      Nevermind I fixed it. Thanks for responding so fast anyways though.

  • @azfarhanif352
    @azfarhanif352 ปีที่แล้ว

    i used in main menu and game scenes, but in in game the save dosen't Work Like In Main menu what can I do for fix this issue?

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      Did you use same playerPrefs key in main menu and level menu ?

    • @azfarhanif352
      @azfarhanif352 ปีที่แล้ว

      @@RehopeGames no

  • @makkertop
    @makkertop ปีที่แล้ว

    Hi, I need some help. I made a script that looks similar to your, but instead of controlling AudioMixer, I controled AudioListener volume. The saving of the volume works, but when I open the settings, slider value doesn't save. Then I made everything like in your script (like controlling myMixer) and nothing changed, slider value doesn't save and I can't controll the volume untill I set Slider Event (OnValueChanged) again. Only then it works. I'll be glad if you help, I really need to solve this problem.

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      Hi , Can I see your script ?

    • @makkertop
      @makkertop ปีที่แล้ว

      A send you a email message because idk why but I had some issues with TH-cam comments. Pls check it out.

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      @makkertop Hello again,
      I just checked the mail. Everything looks fine in your code.
      When you move the slider the volume changes but did not save ?

    • @makkertop
      @makkertop ปีที่แล้ว

      ​@@RehopeGamesYeah, hi again) To be more specific, here is the problem: when I want to test the game and try to change the value of the slider, it changes, but the value of the sound does not change. Then if I set the OnValueChangedEvent again in game mode as shown in the video, I can change the sound and everything works. Then if I exit game mode and come back in, the sound value is saved, but the same problem with the slider occurs. I can adjust it, but the sound value won't change until I set the Event again. Maybe it's some kind of bug in the editor, and when I build the game everything will be fine?

    • @shinesee
      @shinesee ปีที่แล้ว

      @@makkertop I am having exactly the same problem. Did you find a solution to this?

  • @acepew9091
    @acepew9091 ปีที่แล้ว

    Anyone know how to bring the volume to the next scene, for some reason the volume only works on 1 scene. Any solutions?

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      Hello , you can create a prefab from the object and then add the prefab to other scenes.

  • @xiaxiaxo
    @xiaxiaxo ปีที่แล้ว

    idk how to tell, but when the volume is low/muted then i start the game again, i hear some sound for 1 sec.. how to fix that

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      Hello,
      Does the sound turn off after 1 second?
      And did you follow me step by step ?

    • @xiaxiaxo
      @xiaxiaxo ปีที่แล้ว

      @@RehopeGames yes, the sound turn off after 1 sec but its really bother xD. I was follow step by step

    • @jycounnet
      @jycounnet ปีที่แล้ว

      @@xiaxiaxo Hi, I have the same problem. Did you find a way to fix this?

    • @xiaxiaxo
      @xiaxiaxo ปีที่แล้ว

      @@jycounnet still dont know to fix that

  • @Alik-Green
    @Alik-Green ปีที่แล้ว +2

    si-cript

  • @astrali-
    @astrali- ปีที่แล้ว

    i cant find volume setting to set in functions

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      Hello , did you create VolumeSettins Script ?

  • @talhasoylu3261
    @talhasoylu3261 ปีที่แล้ว +1

    dayı senin türk olmama ihtimalin yok

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      Kesinlikle 🤣

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      ​@@talhasoylu3261 Çok teşekkür ederim , beğenmene sevindim 😊

    • @fullgames8195
      @fullgames8195 24 วันที่ผ่านมา

      PUAHAAHAAHAHJHHAHAHDHAH

  • @nott715
    @nott715 11 หลายเดือนก่อน

    Hi Unity warning Can not play a disabled audio source.

    • @RehopeGames
      @RehopeGames  11 หลายเดือนก่อน

      Hİ ,
      Control the the gameobject contain audioSource component in hierarchy panel.
      if it is disable , enable it

  • @A3temii
    @A3temii ปีที่แล้ว

    3:30

  • @Kerem_MertGakadatil
    @Kerem_MertGakadatil ปีที่แล้ว

    Exposed name does not exist: Music
    UnityEngine.StackTraceUtility:ExtractStackTrace ()
    MenuController:SetMusicVol () (at Assets/Script/MenuController.cs:37)
    UnityEngine.EventSystems.EventSystem:Update () how can i fix that

    • @RehopeGames
      @RehopeGames  ปีที่แล้ว

      Did you follow me step by step?