What you NEED to know about game audio as a beginner in 2021! Unity3d

Поделиться
HTML-код
  • Опубликовано: 21 сен 2024

Комментарии • 121

  • @benkersten1808
    @benkersten1808 3 года назад +144

    As someone whose full-time job is to implement audio into Unity games using native Unity tools, this was a fun watch! FWIW, here are some thoughts on Unity audio.
    1. I came from using audio middleware like Fmod and Wwise. Right out of the box, the default Unity audio tools leave a LOT to be desired. You pretty much have to build in every single feature you want/need for your game.
    2. Because it’s up to you to build the functionality, it means you can make the audio behave EXACTLY as you want it to. In some ways, I find it more flexible to build my own system vs. using middleware because you as the audio programmer have ALL the power. However… with great power comes great responsibility. lol. Lots of scripting involved with this, but that’s the fun part!!
    3. About audio getting annoying, repetitive, etc…., that only happens when you’re using sounds that either don’t fit the game, or sounds that don’t fit well with each other, or you haven’t built enough flexibility to keep the sounds interesting, or the ‘mix’ is all wrong. There’s a LOT you can do to keep things from sounding repetitive.
    4. IMO, audio gets ignored quite often because audio is by nature hard to conceptualize and the impression it can make on the player can be difficult to put into words. That said, audio can have a HUGE impact on gameplay, mechanics, feedback, etc. It’s easy to ignore because it’s hard to ‘get right’, and when you ‘get it wrong’…, it’s painfully obvious.
    5. The two biggest drawbacks IMO regarding native Unity audio…, are the reverb and metering. The reverb algorithms and choices in Unity are pretty…. pretty….. pretty… bad. And the metering. It’s pretty much impossible to tell what is ‘really’ going on regarding levels. My workaround for this is to digitally route the audio from Unity to my DAW (digital audio workstation) so I can get truly accurate feedback on levels, loudness, etc.
    6. The hardest thing to get going with native Unity audio is music… if you want the music to be dynamic, and have musical things happen ‘on beat’… I.E., change the music in some way when you do a certain thing in the game, and have that musical change happen on beat with a smooth transition.
    7. Don’t forget the importance of debugging audio…., which Unity really doesn’t do unless you build that functionality yourself. Coming from middleware like Wwise, and not having a voice inspector or advanced profiler to tell us anything about what is going on with audio can be difficult to debug.
    8. The default Unity way of handling ‘priority’ and ‘virtual voices’ also leaves a LOT to be desired. I’ve found it best to handle that myself in code (like most things audio related).
    9. Not really Unity related…, but audio is by nature downstream from nearly every team/discipline. This means you’re constantly having to re-do the same work multiple times. This can be mitigated with a good producer…., but it’s bound to happen often. So please… for the love of all that is right in this world please let the audio folks know when you change ANYTHING in the game!! lol
    10. Audio is a fast way to explode the size of your project and max out the ram. There’s really no ‘bank loading’ system built in to Unity…, so again you have to do this yourself.

    • @subliminalcastillo2126
      @subliminalcastillo2126 3 года назад +1

      What DAW do you use, if you don't mind me asking?

    • @benkersten1808
      @benkersten1808 3 года назад +2

      @@subliminalcastillo2126 I use Nuendo which has some great metering built in, including LUFS to check perceived loudness. But any DAW will probably get the job done.

    • @beri4138
      @beri4138 3 года назад +3

      What even is audio

    • @broganking9830
      @broganking9830 3 года назад +4

      Well said. I find FMOD better for dynamic music composition but for sound effects doing it vanilla Unity audio with some scripting magic is working out better. I've never thought about routing into a DAW though, will definitely try that next. Thanks :)

    • @aldigangster123
      @aldigangster123 3 года назад

      Do you have any good tips / resources for creating an extensive audio system, you can recommend? I understand all the basics, from PlayOneShot() to AudioMixer. But what I struggle with right now is to implement a flexible, scalable, but robust system which handles dynamic music and both spatial (e.g. footsteps) and non-spatial (e.g. UI) sound effects. I can't find any good tutorial, which goes that deep into the subject.

  • @anishsrivatsan2332
    @anishsrivatsan2332 3 года назад +11

    Audio is probably the toughest thing I've always had to tackle in my game. Thanks for the video, was very useful

    • @Unity3dCollege
      @Unity3dCollege  3 года назад +2

      Glad it helped!

    • @beri4138
      @beri4138 3 года назад

      You're like 11 the toughest thing you had to tackle is grade 5 exams

    • @FICHEKK
      @FICHEKK 3 года назад +7

      @@beri4138 No need to be rude. Actually, it is impressive if he is only 11 and already making games!

  • @alanvargas3355
    @alanvargas3355 2 года назад +9

    As a sound/music designer for game development, I really appreciate the video! It's especially helpful because the role of sound implementation has constantly been falling on my shoulders. It's not something I'm super confident with, but this video is helping me a bunch especially being relatively new and not 5 years in the past. I would greatly appreciate more Audio tutorials!!

    • @gameaudioinstitute
      @gameaudioinstitute Год назад

      hi Alan check out the Game Audio Institute's channel for more in-depth solutions to using audio in Unity! youtube.com/@gameaudioinstitute

  • @grimmwerks
    @grimmwerks 3 года назад +4

    I’m coming from the other side - started in music / sound design back in the 90s and fell into programming.

  • @DemonRings
    @DemonRings 3 года назад +5

    yes, more videos like this. I learned many things that I will be using in my game

  • @zombievirals
    @zombievirals 3 года назад +1

    My fear right now is that I'm starting to actually lose my hearing, which doesn't bother me so much that I can't play in a band anymore, but it horrifies me when it comes to game dev. Fortunately, I have a lot of friends with fully functioning hearing I can always call on to help. Thanks for this, audio is something often overlooked, but it really has a HUGE impact on the experience of a game. You could have a game with the most mind-blowing graphics ever, but if the audio is done poorly, it will kill it. On the other hand, you could have a game with modest graphics and decently done audio, have a much better experience. HAPPY NEW YEAR JASON!!

  • @InexperiencedDeveloper
    @InexperiencedDeveloper 3 года назад +3

    I always have trouble with audio...not anymore! Great video, needed very much, thanks for making it!

  • @maenor
    @maenor 3 года назад

    This one is basically a follow-up of your video making a Unity2d game for beginners , I love it! I'm learning so much. Thank you!

  • @subliminalcastillo2126
    @subliminalcastillo2126 3 года назад +1

    I find it very interesting that graphics & audio make a bigger difference on the game's commercial success than the actual gameplay itself.

    • @ik2254
      @ik2254 3 года назад +1

      If you want commercial success, you need to build a game around one principle: will it be interesting to watch how someone else plays it. Period.

    • @subliminalcastillo2126
      @subliminalcastillo2126 3 года назад

      @@ik2254 True that big time. I think most of us can say with utmost certainty that over half of the games we have played in the half decade we found from watching someone else play it.

  • @AnunayMintoo
    @AnunayMintoo 3 года назад +4

    Happy new year everyone!!!!

  • @nelsonianb1289
    @nelsonianb1289 3 года назад

    Ive been searching for days how to get audio to apply to OnMouseDown().
    @13:40 finally gave that single 2 lines of code Ive been looking for THANK YOU SO MUCH!!!!

  • @CleisonRodriguesComposer
    @CleisonRodriguesComposer 3 года назад

    Thank you!
    Your name will be in the credits of my first game.

  • @supertenchoo4271
    @supertenchoo4271 3 года назад

    am so happy i learn a lot from this video.....always late but i have finish it thank you Mr Jason Weimann

  • @learnwithrami8803
    @learnwithrami8803 3 года назад +3

    Great work man 👍

  • @daxdmon3297
    @daxdmon3297 3 года назад +1

    We really need some Unity Shader tutorials this year.

  • @DaniArkadia
    @DaniArkadia 3 года назад +6

    Hey Jason, smashed that like before I clicked onto the video, even though that doesn't make sense. :D

    • @Unity3dCollege
      @Unity3dCollege  3 года назад +3

      Thanks! Its an audio tutorial so I dont expect its gonna have nearly as many as a typical video.. but we'll see :)

    • @DaniArkadia
      @DaniArkadia 3 года назад

      @@Unity3dCollege It's actually super important for me as I'm working on a horror game. so I'm glad you uploaded this!

  • @inkphoenix5446
    @inkphoenix5446 2 года назад

    thanks for the great tutorial m8
    but *ahhh*
    that flashbang at 12:39, my eyes now hurt lol

  • @polymakegames
    @polymakegames 3 года назад

    Loving the tryhard image display int he background. This is quality, boys

  • @nGAGE0nline
    @nGAGE0nline 3 года назад +2

    Great video. Should probably also use the "relativeVelocity" to adjust the volume of each crate's sound within a give min/max range. ;)

  • @Gamer-py4mq
    @Gamer-py4mq 3 года назад +2

    I just finished this project from the last tutorial, now I get to implement this, co-incidence? I think not.

  • @zufu35
    @zufu35 3 года назад +3

    Love the videos Jason! Keep it up :)

  • @syedsadiq8631
    @syedsadiq8631 3 года назад +1

    Happy New year byy 2020 . Welcome 2021

  • @khedwanbl
    @khedwanbl 2 года назад

    Great learning always from your videos.
    Thanks u so much.

  • @christinaVennegerts
    @christinaVennegerts 2 года назад

    This was very helpful, thank you!

  • @MohamedShehab
    @MohamedShehab 3 года назад

    Thanks Jason, your videos are awesome

  • @ewoj104
    @ewoj104 3 года назад

    Been using Unity for many years, never paid attention to Audio Mixers.... guess im working on audio settings today!

  • @MahoKage
    @MahoKage 3 года назад

    Thank you and happy new year

  • @ericksharma5791
    @ericksharma5791 3 года назад

    really cool and easy. i love it man. Thank you :)

  • @_57u
    @_57u 3 года назад

    Great videos and enjoy all of them. One thing - instead of `while (_hasDied == false) {...`, introduce negation and use `while (!_hasDied) {...` :)

  • @BNuwan123
    @BNuwan123 3 года назад

    Clearly explained vidoe...thank you...

  • @DeepWorksStudios
    @DeepWorksStudios 3 года назад +2

    Now I am curious

  • @robinoberg5663
    @robinoberg5663 2 года назад

    Thanks for the great info!

  • @yudnai5577
    @yudnai5577 2 года назад

    NICE!!! I CREATE SFX BGMS AND TRACKS I Tried Wwise but found out that I don't want my sessions to be heavy and cluttered also I want to control every part by myself. The more I added to my sessions got less done fiddling all kinds of third-party stuff. so the KISS rule applies here. very good tutorial. :)

  • @rdragon587
    @rdragon587 3 года назад

    Thanks a lot)

  • @mohamedhazeem411
    @mohamedhazeem411 3 года назад

    Nice👌

  • @ErtBaran
    @ErtBaran 3 года назад

    Thanks so much. You are great.

  • @loonatiks
    @loonatiks 3 года назад

    All the best in the N3w 21, and forget "You know which" as would Harry Potter pronounce it :), Big thanks to Santa 2k21.01 (Jason :) ). for this video tut about Audio in Unity... I an very happy that i wil start one of his courses very very soon...

  • @bosshome8320
    @bosshome8320 2 года назад

    It was helpfull

  • @dimatsyutsyura5167
    @dimatsyutsyura5167 3 года назад

    I love you bro;)

  • @tmoneygamestudio
    @tmoneygamestudio 3 года назад

    Great tutorial again Jason. I really hate dealing with audio in my game and it's going to be in several places. This helps simplify things for me a great deal. Quick question, How do you like that Samsung curved monitor??? I know 2 others that have it and one likes it the other one don't cause he has a green line from top to bottom on the left middle of monitor. My wife seen it at Best Buy and wants to buy it for me.

    • @Unity3dCollege
      @Unity3dCollege  3 года назад +1

      I'm using the LG curved. Its a bit less if a curve and higher res for game dev. Looked at both tho and if u game a lot the samsung is def a better option. I just find that I dev more than 50% of the time now.

    • @tmoneygamestudio
      @tmoneygamestudio 3 года назад

      @@Unity3dCollege I dev more now about 70% 20% in blender and about 10% playing games. Might check out the LG. Thanks for the info

  • @cargorunner9960
    @cargorunner9960 3 года назад +1

    Great video. Really helpful starting guide. While trying to understand the basics I came across a number of posts that warned about memory and performance issues if you have too many audio sources and too many audio clips. But it was not clear what too many is. In your tutorial you have an audio source per monster and crate. On a big level with lots of boxes and monsters will one audio source per game object cause a performance issue? I have a human companion character in my game and eventually there will be a lot of short dialogue clips in the game (I don't have those assets to test with yet). Is this going to generate a massive memory usage if I have that "AudioClip[] _clips" array in my game? Thanks again for all the tutorials.

    • @gameaudioinstitute
      @gameaudioinstitute Год назад

      well, 'too many' is sort of an 'it depends' answer. Unity defaults to 32 simultaneous sounds playing at one time by default but it can increase if the hardware can handle it - you can change that value in the Audio Settings panel over in the Project Settings. if you have the object in question as a prefab and you instantiate it and destroy it, then the memory it takes up and performance can be somewhat managed.

  • @muhammadshahabsharif9106
    @muhammadshahabsharif9106 3 года назад

    I was getting mad about why my game audio is not working then I get this 7:35 🤯

  • @lukastomasek8038
    @lukastomasek8038 3 года назад

    Great tutorial I didn’t know unity has a mixer , I’ll check it out for sure .

  • @Will_Forge
    @Will_Forge 2 года назад +1

    Is it just me and my PC or is none of the sound playing after @Jason Weimann starts playing the Weird_XX SFX files?

    • @Will_Forge
      @Will_Forge 2 года назад +1

      At 19:29 the video seems to have sound again.

  • @ShivamKumar-ly4pg
    @ShivamKumar-ly4pg 3 года назад +1

    Sir How can I develop a team in my game, Each team has 4 players in it?

  • @d2clon
    @d2clon 3 года назад

    Hi @Jason, has you already showed us all the gadgets and decoration objects you have in your room? I am very intrigued and some of them I would like to add them to my room :)

  • @dcry1003
    @dcry1003 2 года назад

    any idea how to work with multiple sound/audio on collision in 1 gameObject?

  • @blakey023
    @blakey023 3 года назад

    Hi Jason, As always thanks for the great content. I was wondering if you would do some tutorials around unity for the quest 2 just got my hands on the headset and really got the VR bug thanks again

    • @Unity3dCollege
      @Unity3dCollege  3 года назад

      I want to soon. Have mine sitting right by my desk ready to go, just gotta deal w/ the SS port already being taken up and re-wire some stuff so I can get to dev work on it soon.

    • @blakey023
      @blakey023 3 года назад

      @@Unity3dCollege oh cool, Ive been experimenting with 1to1 mapping of rooms in my house trying to make interactable little games with real world objects

  • @fokozuynen2048
    @fokozuynen2048 6 месяцев назад

    I had a Unity sounds sfx asset bought on Store now got deprecated and i think the reason is because of copyright . now my question remains do I still can use those sounds ?

  • @buddyroach
    @buddyroach 3 года назад

    I'm not hearing the sound effect at all and the music played at the beginning of the video but after that, I didn't hear it either. wtf

  • @conservativestrawman9837
    @conservativestrawman9837 2 года назад

    I'm a musician who wants to get into game dev so I have been learning Unity, anyone have any tips? looking forward to taking my experience in mixing and recording and putting into a game!

  • @MrBobni
    @MrBobni 3 года назад +1

    hi ,
    very nice video .
    am having a bit of trouble with unity repetitive sound FX
    like when using a repeating method to play a machine gun sound
    as there are lots of audio clips in the scene unity struggles
    reducing the amount of clips being played is not great solution .
    in my game there is a magnet where it collects the coins and as there are more than 25 -30 coins collected soundFX + while shooting the enemies unity starts to stutter and break down . tried setting a script that reduce the amount of sounds being played that makes no since as collecting more coins should give you more feeling of lots of gold being collected :(
    i found that unity default max audio clips is 32 . I tried adjusting it to 50 , 100 still same issue .
    in the profiler max number of real voices reached 35 . so I don't get why it stutters at 25 -30
    your guidance would be appreciated .
    thanks :)

  • @fj06carnone
    @fj06carnone 2 года назад

    When playing music through one AudioSource, it's fine. Playing effects through another AudioSource, it's fine. But playing them together causes the music volume to get lower once, and my effects volume to keep getting lower until thye're silent. My mixer shows both of them has having a stead volume. Cannot figure it out for the life of me.

  • @876Rage
    @876Rage 3 года назад +37

    Fun fact: when someone says ‘fun fact’ everyone reads the entire comment

  • @johnanthony44
    @johnanthony44 3 года назад

    For background music, should you use a different load type/compression format for the audio import settings?

  • @64BitTwilight
    @64BitTwilight 2 года назад

    What if you developing a game for production and a client aren't there any licensing legal restriction to this method?

    • @Hietakissa
      @Hietakissa 2 года назад +1

      In that case you should make sure the sound effects are either custom made for the game or use the CC0 license or something similar

  • @ethanchim1237
    @ethanchim1237 3 года назад

    Mine says "Value can not be null" when I launch the bird in level 2. Can you tell me the problem?

  • @CoKeHQ1
    @CoKeHQ1 Год назад

    is it possible to add many audio sources for one prefab and call on them separately somehow in the code?
    Your array system for clips seems to be a good way, but seems limited if you want to adjust the audio source(like volume, pitch etc.)
    What about if you want the volume and direction of the sound to change depending on the position of the source to your camera/player? for some reason this doesn't work right for me and the sound is always centered even if I am far away and have slider set to lean more on 3D
    + you mentioned that you could have new music for all scenes but how do you setup if you want the music to keep on playing even tho the scene changes in a way that the sound is not interrupted? had some DontDestroyOnLoad scipt to do this but for some reason it destroyed the Audio after going through 2 scenes.

  • @syedsadiq8631
    @syedsadiq8631 3 года назад +1

    If u make water make in unity 3d plz make this tutorial whith free assets plz i get lot of help from u r best youtube tutorial plz

    • @beri4138
      @beri4138 3 года назад

      If you make English make in Unity plz

  • @FICHEKK
    @FICHEKK 3 года назад

    Why are you no longer using Rider?

  • @kasquez
    @kasquez 3 года назад

    Hey Jason, could you please explain how to loop from the end of the song file to a specific point in the same song? In case the song has an intro that's not part of the loop. I came hoping it was already explained in the video, but it's not. Thanks in advance.

    • @benkersten1808
      @benkersten1808 3 года назад +1

      I'm not Jason, but my advice would be to use say 3 individual files. Intro, Loop, Outro. If you loop from the end of the song/file to somewhere else it's highly possible that it won't be happening at '0 crossings' in the audio and you'll end up with clicks and pops. And I believe you would need to know the exact sample at which you want the loop to start, which you could find using a DAW. Then you could tell the audio source to seek that exact sample.
      Also, depending on the loop point, you might also hear the tail of various reverbs/instruments in the mix.

  • @felix9202
    @felix9202 3 года назад +1

    This may seem like a silly question but shouldn't the _clips.Length in UnityEngine.Random.Range be _clips.Length - 1 ? Since in the docs it says Unitys Random is inclusive and Length would return in this case 3 which is the number of clips in the array, but UnityEngine.Random.Range could roll 0 1 2 3 which would be 4 values? I'm still learning and just genuinely curious if I'm misunderstanding either Random or Length
    Edit: Tip for anyone learning: Actually read the whole article in documentation.
    If floats are passed it's inclusive for min and max, and if integers are passed min is inclusive and max is exclusive.

  • @jt9564
    @jt9564 3 года назад

    Your videos are awesome, Im almost finished my project, but my background music keeps making a clicking/skip noise, like some kind of latency error, are you able to help?

    • @gameaudioinstitute
      @gameaudioinstitute Год назад

      this is very late in reply, but here are some tips for next time: play the loop in the Preview in Unity and turn the loop option on. does it skip there? if so the issue is with your file. is your loop an MP3 loop? if so, try bouncing it out as a WAV file from your DAW. sometimes DAWs can smooth out loop points but they're not accurate when actually bouncing out the loop itself. you ideally should open the loop in a dedicated audio editor like Audacity.

  • @diliupg
    @diliupg 3 года назад

    imagine a horror movie without sound.. dracula coming at you with his mouth open.. I think it will look rather funny..

  • @blindalienproductions5589
    @blindalienproductions5589 3 года назад

    Do you know anything about soft coding for games?

    • @user-og6hl6lv7p
      @user-og6hl6lv7p 3 года назад

      Soft coding is just using variables instead of constants or static values.

  • @chucklowe297
    @chucklowe297 3 года назад

    CRINGE TIME! LOL
    What's an easy way to eliminate speaker popping? I can have hundreds of instances at one time trying to play audio. I try to control it by having them offload sound effects to "speaker" objects so I can control how many are available at one time.
    If "speaker" is playing, it finds one that isn't, if all are playing then sound is ignored. No issues with pc, but it's a mobile game so I have to actually build after each change. (never been able to get unity remote to work)
    I'm assuming I just need to reduce the number of "speaker" instances, but how can I easily determine a maximum? Will speaker groups help with this system?
    THANX FOR THE VIDEOS!

  • @ruchdaneabiodun
    @ruchdaneabiodun 3 года назад

    Hi

  • @rudolfsilkens604
    @rudolfsilkens604 2 года назад

    public AudioClip GetNewRandomClip()
    {
    List sorter = new List();
    if (clips.Length == 1)
    return clips[0];
    foreach (var clip in clips)
    {
    if (clip != lastClip)
    sorter.Add(clip);
    }
    return lastClip = sorter[Random.Range(0, clips.Length - 1];
    }

  • @eduardopatricio
    @eduardopatricio 2 года назад

    "Find" sounds 🤦🏽‍♂

  • @firecode3495
    @firecode3495 3 года назад

    "mute audio" jajajajaj ..me.

  • @someobscuremusicchannel
    @someobscuremusicchannel 2 года назад

    oh my god that "carnival music" sounds terrible