How To Add Sound Effects the RIGHT Way | Unity Tutorial

How To Add Sound Effects the RIGHT Way | Unity Tutorial

Sasquatch B Studios

1 год назад

21,248 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

It's Mustafa
It's Mustafa - 26.08.2023 08:47

What about saving the value of voiumes ?? These will be lost each time the scene reloads? or
not?

Ответить
ChapCanai
ChapCanai - 14.07.2023 17:05

Do the sliders stop working after reloading scene?

Ответить
Catoise
Catoise - 04.04.2023 17:01

Thank you. Very helpful video!!

Ответить
thenewaeon
thenewaeon - 16.03.2023 23:40

I'm just getting started learning Unity and am about to add audio to my first solo project. I definitely would have fallen for the beginner's traps shown here. It really seems worthwhile to go the extra mile to avoid a buggy mess. Thanks for the solid info and great job on the tutorial!

Ответить
E
E - 08.03.2023 23:12

How can I make it so these settings persist using PlayerPrefs? I have added a save button and the values are stored correctly, in my GameManager's on Awake function I load these values, set them in the SoundMixerManager and also in my OptionsMenuUI to the sliders.
The sliders continue to be full.

Ответить
E
E - 08.03.2023 21:04

I love these kind of managers! I have a 2D project template and each time I find a gem like this I work it in there. Thanks a lot!

Ответить
Owen Cooper
Owen Cooper - 10.02.2023 06:58

Nicely done. All the most important points covered.
Something I would add is that in addition to playing random clips, it’s nice also randomly setting the pitch and volume, which can give a sense that you have more asset variation.
The issue then is that destroying by clip length will not adapt to the length change from pitch adjustment. To account for this, you can set the destroy time for the spawned AudioSource to:
audioSource.clip.length/audioSource.pitch.
Hope that helps!

Ответить
betruet
betruet - 01.01.2023 10:54

fantastic explanations

Ответить
Notreal76
Notreal76 - 08.12.2022 22:00

Great Tutorial, as always.

Ответить
Midnite Oil Software LLC
Midnite Oil Software LLC - 08.12.2022 17:58

I've never seen anyone instantiate and destroy AudioSource objects like that. Each of my sound managers has a single audio source mapped to an audio mixer group and I use PlayOneShot() to play sound effects. Of course that doesn't use spatial audio though so if you really want the surround sound effect I guess you need an approach similar to yours. I would probably implement object pooling though so as not create a bunch of garbage and get lag spikes.

Ответить
Coco
Coco - 08.12.2022 17:18

First

Ответить