You have no idea how long I’ve been looking for this explanation… I’m working on a game and noticed my audio gets cut off if I rapid fire and had no clue what was wrong. Thank you
You can see more of the scenery in my sound design videos here: johnleonardfrench.com/articles/unity-audio-tutorial-series-adding-sounds-to-the-sun-temple/ or you can download the asset. It's the Sun Temple but Sandro T and it's free
Amazing video! Thanks so much. And sorry for asking about this on an audio related video, but how did you create those clouds, and how did you place that grass?
@@GameDevBeginnerhi, does free also include making a public vrchat world with it, adding my own elements or use parts of it, like 4xample only the Central Building? THX :)
Great video, was very informative! I'm just wondering how to loop my audio via a script as you didn't exactly touch base on that. Is there a .loop method I'm missing or is it part of the .play() syntax? Thanks!
It is possible, with Play Delayed or Play Scheduled, but not with Play One Shot as far as I know. But you could put Play One Shot in a function and then delay that using Invoke, or a coroutine.
hello, piano project, each key on the keyboard plays a note, through the sound clip, how to play it alone? that is, according to the line of the music, I must perform 1 to 7 notes in the sequence, how to do this? Congratulations to You (Musical Notes) Grades: DO-DO-RE-DO-FA-MI DO-DO-RE-DO-DO-SOL-FA LA-LA-DO-LA-FA-MI-RE LA-LA-SOL-FA-SOL-FA
In my game I have an item that makes 2 separate sounds when used. One that is played immediately, and another that is played after a delay and if the item was used successfully. So sometimes only the first sound will play. I want to have the first sound stop playing if the item was used successfully, but only after the delay. So you would hear the first sound, and after 0.1 seconds it would cut out and play the second sound. I tried using 1 audio source and then using the playDelayed function to play the second sound, but for some reason it seems to cut out the first sound completely, and you only hear the second sound. I think it’s because of the audio clip being changed? I tried making a special mono behavior that would basically control the audio source and carry out the delay I wanted before setting the new audio clip, and that seems to work. I just wanted to ask if this seems like a normal solution or if anyone has came up with any different solutions. Thanks in advance.
Play Delayed, just like PlayScheduled works like Play, in that it cuts out other sounds and will appear to be playing (by checking isPlaying) even before the clip starts. One way you could do this instead is with a Coroutine and Wait for Seconds and just use the normal Play function if and when you need it.
ok amazing video im making a game where there is a day and night cycle and i want the birds audio clip to play at a specific time in the morning but i dont know how, i have been wondering around for three days and nothing works, im so new so im really dumb so should i use play scheduled?
Off the top of my head, maybe try storing a global time of day value and use events to connect up things that need to happen throughout the day. To avoid having every event check constantly if something is due, keep one list of all the events and check their due time against the time of day every 5 mins. (see my events video for an idea of how to do this: ua-cam.com/video/J01z1F-du-E/v-deo.html or Ryan Hipple's 2017 Austin talk, particularly the bit on runtime sets: ua-cam.com/video/raQ3iHhE_Kk/v-deo.html). It's a rough idea, but that's how I d approach it.
@@GameDevBeginner thank you so much!! I'll try that and hopefully it will work!! But I have an event that makes the street lights turn off and on, but I don't know how to use that to make the sound play, cuz whatever I type shows an error or it doesn't exist 😅 but yeah I don't know much so hopefully your videos will help!!
This video is missing probably the most important piece. Creation and initialization of the AudioSource component.
gamedevbeginner.com/how-to-play-audio-in-unity-with-examples/ this is the article he put in the description which explains implementation.
Very good and clear video on all the AudioSource Playing Topics
Quick, concise and useful. Very good explanation!
I found your article on this a week ago. Loved it. Thanks for making a video also in this age of watching rather than reading :/ haha
Same, specifically came to the video to give a thumbsup^^
Helpful article for a Unity-noob
Thank you both, I appreciate it.
Hey i just readed your 10 Unity Audio Tips article, good work :)
The best tutorial about audio!
Thank you!
Thanks for your method, cheers
Good and to the point thanks
Great quality video!
This was greatly needed!
You have no idea how long I’ve been looking for this explanation… I’m working on a game and noticed my audio gets cut off if I rapid fire and had no clue what was wrong. Thank you
Glad I could help!
I love this scenery. It's beautiful. Do you have a full video showing it?
You can see more of the scenery in my sound design videos here: johnleonardfrench.com/articles/unity-audio-tutorial-series-adding-sounds-to-the-sun-temple/ or you can download the asset. It's the Sun Temple but Sandro T and it's free
hi mate! great video. What would you do for auto fire gunshots sounds to play evenly? Thanks
This is extremely useful! Thank you for this video!
You're welcome!
Amazing video! Thanks so much. And sorry for asking about this on an audio related video, but how did you create those clouds, and how did you place that grass?
Everything you see here is the Sun Temple asset by Sandro T on the Asset Store, it's also free.
@@GameDevBeginnerhi, does free also include making a public vrchat world with it, adding my own elements or use parts of it, like 4xample only the Central Building? THX :)
Great video, was very informative! I'm just wondering how to loop my audio via a script as you didn't exactly touch base on that. Is there a .loop method I'm missing or is it part of the .play() syntax? Thanks!
It's an Audio Source property. You can either set it in the Inspector or you can access it via script (e.g. audioSource.loop = true;)
Is it possible to delay an audio clip? So delay the the start of PlayOneShot, so that the audioclips don't start for half a second or so
It is possible, with Play Delayed or Play Scheduled, but not with Play One Shot as far as I know. But you could put Play One Shot in a function and then delay that using Invoke, or a coroutine.
@@GameDevBeginner Yeah that's what I was thinking of trying aswell, thanks
What is the game on the footage? Is it available anywhere?
It's a Unity asset, the Sun Temple, available here: assetstore.unity.com/packages/3d/environments/sun-temple-115417
hello, piano project, each key on the keyboard plays a note, through the sound clip, how to play it alone? that is, according to the line of the music, I must perform 1 to 7 notes in the sequence, how to do this?
Congratulations to You (Musical Notes)
Grades:
DO-DO-RE-DO-FA-MI
DO-DO-RE-DO-DO-SOL-FA
LA-LA-DO-LA-FA-MI-RE
LA-LA-SOL-FA-SOL-FA
wait how do i define audioSource
In my game I have an item that makes 2 separate sounds when used. One that is played immediately, and another that is played after a delay and if the item was used successfully. So sometimes only the first sound will play. I want to have the first sound stop playing if the item was used successfully, but only after the delay. So you would hear the first sound, and after 0.1 seconds it would cut out and play the second sound.
I tried using 1 audio source and then using the playDelayed function to play the second sound, but for some reason it seems to cut out the first sound completely, and you only hear the second sound. I think it’s because of the audio clip being changed?
I tried making a special mono behavior that would basically control the audio source and carry out the delay I wanted before setting the new audio clip, and that seems to work. I just wanted to ask if this seems like a normal solution or if anyone has came up with any different solutions. Thanks in advance.
Play Delayed, just like PlayScheduled works like Play, in that it cuts out other sounds and will appear to be playing (by checking isPlaying) even before the clip starts. One way you could do this instead is with a Coroutine and Wait for Seconds and just use the normal Play function if and when you need it.
Огромное спасибо!!!
Great video! I just cant decide whether to subscribe or not because you are at 69 subs...
Nice
@@GameDevBeginner i subbed, ur past 69 now
Not on topic but... how is so much stuff on your taskbar???? 😂
ok amazing video
im making a game where there is a day and night cycle and i want the birds audio clip to play at a specific time in the morning but i dont know how, i have been wondering around for three days and nothing works, im so new so im really dumb so should i use play scheduled?
Off the top of my head, maybe try storing a global time of day value and use events to connect up things that need to happen throughout the day. To avoid having every event check constantly if something is due, keep one list of all the events and check their due time against the time of day every 5 mins. (see my events video for an idea of how to do this: ua-cam.com/video/J01z1F-du-E/v-deo.html or Ryan Hipple's 2017 Austin talk, particularly the bit on runtime sets: ua-cam.com/video/raQ3iHhE_Kk/v-deo.html).
It's a rough idea, but that's how I d approach it.
@@GameDevBeginner thank you so much!! I'll try that and hopefully it will work!!
But I have an event that makes the street lights turn off and on, but I don't know how to use that to make the sound play, cuz whatever I type shows an error or it doesn't exist 😅 but yeah I don't know much so hopefully your videos will help!!