How to Add MUSIC and SOUND EFFECTS to a Game in Unity | Unity 2D Platformer Tutorial #16

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ •

  • @xoreh1537
    @xoreh1537 Рік тому +34

    I swear the tutorials that are the most helpful are so underrated and low views, you have no idea how much this helped me. THANK YOU!

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

      I'm glad it helped you 😊
      Thanks for your nice feedback 🙏

  • @Massive-G
    @Massive-G 11 місяців тому +16

    Love your C-Krypt tutorial bro 😂😂
    This is the only tutorial where I smile and learn at the same time, looking more from you! 💯

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

      Thank you so much bro , I'm glad hear that.
      You are so kind , Smile all your life. 😊

  • @Stuka1NCOMING
    @Stuka1NCOMING 10 місяців тому

    5:14 Well played Sir... and thank you for the video

  • @MasonWolf90
    @MasonWolf90 6 місяців тому +2

    Thanks, this is a short and simple tutorial that doesn't overcomplicate things. Those are hard to find these days.

  • @energyapp2521
    @energyapp2521 Рік тому +13

    "Sicript" lmao brooo... but dont worry the tutorial is cool, thanks!

  • @cyberdaria
    @cyberdaria Рік тому +9

    This was so clear and helpful, thank you

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

      Glad it was helpful 😊
      Thanks for your nice feedback 🙏

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

    dude thanks for all the great content, as a begginer (hobbiest) in game dev your content is a hidden gem !

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

    ı have discovered this channel recently,it's so useful thanks;

  • @twistedcolt45
    @twistedcolt45 9 місяців тому +2

    How did you declare it as AudioManager audioManager? Mine doesn't recognize the namespace AudioManager? How can I fix this?

  • @dalnori_steam
    @dalnori_steam 2 місяці тому +1

    you have an AWESOME looking game for real, but what file format you use for those sounds: wav, mp3 or what?

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

      you can use any of them

  • @hiimdaisy946
    @hiimdaisy946 9 місяців тому +1

    thank you very much. you made my day so much better

    • @RehopeGames
      @RehopeGames  9 місяців тому

      Thanks for the nice feedback 😊

    • @hiimdaisy946
      @hiimdaisy946 9 місяців тому

      @@RehopeGames I have some quick questions. How do you play a song audio when a text UI reaches a certain number? Ive been looking everywhere and I couldnt find anything. I want to play a sound when a player reaches 5 points and repeat it every 5 points or multply to increase the score quota and play a song. like a player scores 5 and a song will play and then next time if he scores 15 the song will play and then 30 etc etc. And I want to be able to play a song just one time too.
      This is for c# in unity of course.

  • @MrSoberArt
    @MrSoberArt 7 місяців тому +3

    when adding SFX sounds.
    And trying to write code GetComponet.
    I kept getting a error and was not able to add SFX this way.
    Had to use a SRC Component which let me add SRC Sounds to my script and then use them in code.
    If anyone know why I was getting that error on FindGameObjectWithTag line.
    Was getting error on GetComponent audioManager.

    • @zixenvernon1643
      @zixenvernon1643 3 місяці тому +1

      i keep getting this error too, I'm so close to finishing and now i don't know how to call the audio manager

    • @matthewwilliamsvideos
      @matthewwilliamsvideos 2 місяці тому +2

      I don't know either I don't know what to do to make it work 😅

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

    thanks i'm starting to make my own 2d game

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

    Great tutorial appreciated!

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

    Thanks so much ! Nice video Sir !!

  • @the_allay_4846
    @the_allay_4846 3 місяці тому

    im just tired rn, so here pretend this is a thumbs up ig

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

    Hocam yaptığınız oyun gerçekten çok güzel görünüyor ellerinize sağlık :)

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

      Teşekkürler 😊

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

      @@RehopeGames hocam birde 6:04'de particles diye bir script doyasından değiştiriyorsunuz ama benim öyle bir script dosyam yok oluşturmam mı gerek illaki çünkü sadece death ve background music eklemek istiyorum

  • @DevernSpades
    @DevernSpades 7 місяців тому +1

    1:18 Gorilla tag SFX

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

    Nice. Also randomize the pitch of the sound fx. So it can sound slightly different each time.

  • @faynore806
    @faynore806 9 місяців тому

    Hi Rehope! Awesome tutorial, thank you

  • @RideeeGo
    @RideeeGo 21 день тому

    Why do I need to use SerializeField? 3:32

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

    Dostum ellerine sağlık çok yardımcı oldun çok teşekkür ederim 💙

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

      Güzel yorumun için ben teşekkür ederim kardeşim 😊

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

    Great to find your chanel👍🏻

  • @franciscorochin2085
    @franciscorochin2085 3 місяці тому

    Great video!

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

    Amazing tips!

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

    why on my visual script kinda different about this 3:32, am i get something wrong?

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

    Thank You !!!!!! for this tutorial.

  • @YGDEV69
    @YGDEV69 9 місяців тому +1

    Got a new subscriber.

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

    Tomorrow I sit down to my platformer and add stuff from this series. Seriously, I discovered this channel today, and it's perfect when it came to us making a platformer. Could you make a tutorial for levels like in Dadish? It means that we can choose a level in the menu and when we beat one level we go to another. That would be really useful. Also, if you did a video like this, could you explain how I can add something to it before going to the next level?
    I know I'm asking for too much (lol) but I am currently learning to program and it would be very useful to me, because I know Unity, but only the basics of C# and i cant create good scripts, only veerry basic. Sorry for the long comment and requests. If ever my platformer succeeds and be very big game, it's your fault too. And other UA-camrs.

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

      I forgot to add that I think you deserve more subscribers and publicity. What you do is at a high level, and communication with viewers is very good.

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

      Thanks for this long paragraph. 😊
      I'm gonna add Level map and other UI system to the game.
      I'm also thinking of shooting different kinds of game making series.
      I hope this channel helps you😉
      Thank you so much for your nice comment , that is valuable for me 😊

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

      @@RehopeGames thanks for reply 😁 Glad you're continuing this series and adding more things.

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

    this is so helpfull , Thankyou very much

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

    why mine sounds doesnt play, i try to call it in other scripts but nothing happened, i already add audio listener in main camera

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

      There can be many reason for this, plz make sure you are following the video step by step.

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

      @@RehopeGames i put it on the wrong script , i forgot to remove it and thought i still use that script, spend for few hours wondering why my code doesn't work, and thanks for the knowledge!

  • @KuroshinaMusic
    @KuroshinaMusic 9 місяців тому

    Hello, I have tried your tutorial, but I encounter a problem, I have changed the script to make it destroy the audio manager in scene 2, so there's duplicated audio manager, only the one from scene 1 will be active.
    the song is keep playing continuously , but the the sfx I assigned to my buttons in scene 2 don't work, it show missing (object), even tho there audio manager (from scene 1).
    it will be really appreciated if you help me to solve this :)

  • @commonwombat-h6r
    @commonwombat-h6r 8 місяців тому +1

    very nice! Thank you !

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

    This is an awesome tutorial, I am only running into one issue. I am making a game with zombies, and i have an audio clip play when a zombie sees me. The problem is that when multiple of the same audio play, it gets super loud and distorted for some reason. I am unsure as to why. I hope you can help me ;)

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

      It really just seems to be a issue when they overlap, any idea of how i could fix this?

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

      Also what would be the best way to edit thhe volume for specific sounds?

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

    Hey, how do you make it so the background music loops when done?

  • @Mrbarry-u5u
    @Mrbarry-u5u 2 місяці тому

    Bro if uses the assets of your tutorials in their game then there will be no copyright issues, right?

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

    Hey Rehope, my code is giving me a error when I use the GetComponent
    Its saying that 'GameObject[]' does not contain a definition for 'GetComponent' and no accesibl extension method 'GeComponent' accepting a first argument of type 'GameObject[] ' could be found
    How can I fix this ? - I'm using Unity 2020.3.30f1 (btw)

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

      Hey 👋
      Can you show me your script?

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

      Thank you so much for replying, re-watching your video, I actually found the error lol. It was way simpler then I thought but still, thanks for the amazing video !!@@RehopeGames

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

      👍

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

      what was the fix I encountered the same error
      @@ssalamandr4

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

      I have the same problem, and i don't find which is the error, how did u solve it?

  • @fluuuly2954
    @fluuuly2954 9 місяців тому

    i cant drag and drop the SFX Source in the missing audio source pls help

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

    THANK YOU SO MUCH!!!!

  • @dori-a246
    @dori-a246 2 місяці тому

    I tried this and when my game loads it just instantly crashes with 35 error messages saying "NullReferenceException" please help
    edit: nvm figured it out

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

    Hello why wont the audio play on my game?
    Why does it work only when i put my audio inside the "Audio Source" Component, unlike yours?

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

      Hello sorry for the late reply. I hope you solved it 🙏

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

      @@RehopeGames no I haven't solve it, and yes I already follow you step by step and Still didn't work

    • @TaleArtist
      @TaleArtist 9 місяців тому

      I know I'm four months late, but I think you have to do the song like this:
      using UnityEngine;
      public class MusicConverter : MonoBehaviour
      {
      [Header("Audio Source")]
      [SerializeField] AudioSource musicSource;
      [SerializeField] AudioSource SFXSource
      [Header("BGM")]
      public AudioClip BGM;
      public AudioClip Death;
      [Other SFX here]
      private void Awake()
      {
      DontDestroyOnLoad(gameObject);
      }
      private void Start()
      {
      musicSource.clip = BGM;
      musicSource.Play();
      }
      }
      ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      If you have any more Sound Effects, put them in the spot that says "[Other SFX here]"

  • @luke.wayneee
    @luke.wayneee Рік тому +1

    How can I continue playing my music in other scene?

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

      Hello,
      This video is about that 👍 ua-cam.com/video/xswEpNpucZQ/v-deo.html

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

    Really thank you.

  • @mTrustis
    @mTrustis 7 місяців тому

    nice tut bro

  • @matthewwilliamsvideos
    @matthewwilliamsvideos 2 місяці тому +1

    Help please

  • @JevinDK-wm9dg
    @JevinDK-wm9dg Рік тому

    Hello. What is the format of the music file you used?

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

    particle scipt?

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

    What if the audiomanager has different scenes?

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

      Hello Muhammad , maybe this video can help you ua-cam.com/video/xswEpNpucZQ/v-deo.html

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

      @@RehopeGames thank you so much

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

    1:18 Gorilla tag???

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

    casual game sound arent these gorilla tag sounds

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

    how to add more than one musicsource?

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

      Duplicate it With CTRL+D Shortcut 😊
      If you give me detail about what you wanna , maybe I can help you 🙏

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

      @@RehopeGames thanks, I've done it with a condition

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

      @@MuhammadHsby 👍

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

    adamsın kanka

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

    merhaba hocam turkmusunuz?

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

      Merhaba,
      Evet Türküm 😊

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

      @@RehopeGames hocam bütün videolarinizi izledim gercekten en iyi kanallardan birisiniz öğretim kısmında 😁 2 yıldır unity kullanıyorum bilmedigim seyler öğrendim

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

      @@hamsterserdar197 Faydalı olabildiysem ne mutlu bana 😊Oyun yapım sürecinizde başarılar dilerim.

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

      @@RehopeGames çok saolun hocam bir sorun var bende sizin kaç yıllık 2d tecrubeniz olur diye düşünüyorum benim bu oyunda bir sorun var isterdim bu sorunu özel hesaplarinizdan bildiriyim belki sorunun çözümünü bilirsiniz

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

      @@hamsterserdar197 6 yıldır unity ile oyun geliştiriyorum. Mail adresime atabilirsiniz (RehopeGames@gmail.com). Bilfdiğim birşeyse yardımcı olmak isterim

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

    Script❌Siciript✅

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

    comawn what are you doing in the particle controller?
    get out of there 😭

  • @AYMANERGUIGUE-vi5wq
    @AYMANERGUIGUE-vi5wq 10 місяців тому

    Code source unity de game please

  • @samgamerca
    @samgamerca 2 місяці тому +1

    s-cript

  • @TurkishDarkWeb.
    @TurkishDarkWeb. 9 місяців тому

    lütfen kodlarıda ekle

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

    kiss me

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

    Si cript

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

      I will share all assets soon.
      Thanks for your interest.