Unity AUDIO Volume Settings Menu Tutorial

Поділитися
Вставка
  • Опубліковано 20 гру 2024

КОМЕНТАРІ • 101

  • @Yensuo
    @Yensuo Рік тому +18

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

    • @RehopeGames
      @RehopeGames  Рік тому

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

  • @Dombrix
    @Dombrix 5 місяців тому +2

    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

  • @agustinquindimil6594
    @agustinquindimil6594 Місяць тому

    I always come back to this, THANK YOU BROTHER!

  • @adeladam2325
    @adeladam2325 Рік тому +3

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

  • @opalstudios
    @opalstudios Рік тому +1

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

    • @RehopeGames
      @RehopeGames  Рік тому

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

  • @SmooCoder
    @SmooCoder Рік тому +4

    Best Tutorial for Volume Slider

  • @HowlMarkStudios
    @HowlMarkStudios 6 місяців тому

    This is the only best unity tutorial channel 😍

  • @razan_psut
    @razan_psut 4 місяці тому

    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

  • @DonMhylios
    @DonMhylios 5 місяців тому

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

  • @e.furkansengul9877
    @e.furkansengul9877 5 місяців тому

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

  • @copitotobby
    @copitotobby 6 місяців тому

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

  • @nadiadwi4966
    @nadiadwi4966 2 місяці тому

    Hi! I have a problem at 6:43. the volume is not saved and it reverts to default settings.
    Is there any solution?
    I have done all the steps.

    • @nadiadwi4966
      @nadiadwi4966 2 місяці тому

      on SFX it can be saved, but on music it cannot be saved

  • @druwayu
    @druwayu Рік тому +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.

    • @druwayu
      @druwayu Рік тому

      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  Рік тому

      👍

  • @randomstuff691
    @randomstuff691 Рік тому +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  Рік тому

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

  • @FaKz92
    @FaKz92 10 місяців тому +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...

  • @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?

  • @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.

  • @antsforever1356
    @antsforever1356 Рік тому +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 Рік тому +1

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

    • @antsforever1356
      @antsforever1356 Рік тому

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

    • @RehopeGames
      @RehopeGames  Рік тому +1

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

  • @Bloodyteo
    @Bloodyteo 16 днів тому

    Great tutorial, keep it up!

  • @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 😊

  • @maddogmccree88
    @maddogmccree88 6 місяців тому +1

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

  • @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?

  • @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 ua-cam.com/video/xswEpNpucZQ/v-deo.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 🙏

  • @pinumber745
    @pinumber745 Рік тому +2

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

    • @RehopeGames
      @RehopeGames  11 місяців тому +1

      Did you follow the video step by step?

    • @ch1laxbr0
      @ch1laxbr0 11 місяців тому

      i have the same issue

    • @pinumber745
      @pinumber745 11 місяців тому

      @@RehopeGames yep, every step

  • @yarden_cohen
    @yarden_cohen Місяць тому +1

    can you do the same thing with master audio? thenk you.

  • @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 UA-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?

  • @kantallive
    @kantallive Рік тому +1

    Thank you for the video

  • @meryemaydn8615
    @meryemaydn8615 Рік тому

    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  Рік тому

      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 🙏

  • @leclisse7
    @leclisse7 Рік тому +2

    Thank you!

    • @RehopeGames
      @RehopeGames  Рік тому

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

  • @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

  • @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

  • @UltraKrillex
    @UltraKrillex Рік тому

    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  Рік тому

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

    • @RehopeGames
      @RehopeGames  Рік тому

      Can you show me the script pls

    • @UltraKrillex
      @UltraKrillex Рік тому

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

  • @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?

  • @mhf169
    @mhf169 17 днів тому

    Thanks dude!

  • @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.

  • @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 ua-cam.com/video/IxHPzrEq1Tc/v-deo.html

  • @david_hade3284
    @david_hade3284 4 місяці тому

    Nice Video thanks!

  • @makuachigaming431
    @makuachigaming431 5 місяців тому

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

    • @mnajoke6275
      @mnajoke6275 6 днів тому

      Right click in the empty space and hover over create when it expands you'll find audio mixer below

  • @LucasGimenes-h2y
    @LucasGimenes-h2y Місяць тому

    when i start the volume is always on zero, even if i restart the game its zero.
    someone plzzzzz help

  • @frankieplayzz8382
    @frankieplayzz8382 8 місяців тому

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

  • @astrali-
    @astrali- Рік тому

    i cant find volume setting to set in functions

    • @RehopeGames
      @RehopeGames  Рік тому

      Hello , did you create VolumeSettins Script ?

  • @talha-r2v
    @talha-r2v Рік тому +1

    dayı senin türk olmama ihtimalin yok

  • @Alik-Green
    @Alik-Green Рік тому +2

    si-cript

  • @nott715
    @nott715 Рік тому

    Hi Unity warning Can not play a disabled audio source.

    • @RehopeGames
      @RehopeGames  Рік тому

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

  • @A3temii
    @A3temii Рік тому

    3:30

  • @eleanordoyle8897
    @eleanordoyle8897 2 місяці тому

    😂

  • @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