Тёмный
No video :(

PLEASE use a Unity SOUND MANAGER! - Full Tutorial 

Small Hedge Games
Подписаться 1,1 тыс.
Просмотров 6 тыс.
50% 1

Sound Managers are crucial when using audio sources in Unity. It really helps to organise your sound events in a structured way!
Github Code: github.com/Sma...
*LIGHT FLICKER ULTIMATE* assetstore.uni...
Assets Showcased:
LIGHT FLICKER: assetstore.uni...
BACKGROUND: assetstore.uni...
WIZARD: assetstore.uni...
PLAYER: assetstore.uni...
SOUND FX: assetstore.uni...
FOOTSTEPS: assetstore.uni...
FULLSCREEN: assetstore.uni...
Support me :) - buymeacoffee.c...
Website - www.smallhedge...
My games - small-hedge.it...
Twitter - / smallhedgehq
Facebook - / smallhedgehq
RU-vid avatar created by OliGalArt, go check her out! ko-fi.com/olig...
00:00 Intro
00:19 What is a SoundManager?
00:43 Example Scene
00:59 What are we doing today?
01:27 Into Unity
01:35 Light Flicker Ultimate
01:57 CHAPTER 1: FUNCTIONALITY
02:37 Sound Enum
02:59 Getting the Audio Source
03:21 Audio Clips
03:40 PlaySound() Method
04:39 Passing in Audio Clips
05:09 Lets try it out!
05:41 CHAPTER 2: ANIMATOR
06:06 PlaySoundEnter/Exit Scripts
07:10 Lets try it out!
07:36 Adding all the sounds in
07:57 Lets try it out!
08:12 FOOTSTEPS
09:08 CHAPTER 3: INSPECTOR
09:37 Multidimentional Arrays in Inspector
10:58 Renaming Inspector Array Names
11:35 Renaming Array Names in Code
13:47 WOAH ITS MAGIC!
14:09 Adding Sounds
14:18 Updating PlaySound() Method
15:42 WE DONE IT!

Опубликовано:

 

17 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@Equisdeification
@Equisdeification Месяц назад
Nice video! A simple dictionary of that you create at runtime feels much easier to read. Also be careful with having all your sounds in a single script, specially on mobile, because if the game grows, this means having all the game audio loaded into memory from the start, even sounds that you don't even need in the current scene
@alicia8382
@alicia8382 3 месяца назад
this is such a good tutorial, seriously so helpful! love how you structure the video and actually show the features you're talking about at the START of the video. it helps so much to know if this tutorial is something i'm looking for. super easy to follow! thanks for sharing this for people like me to learn and follow along for free!!!
@SmallHedgeHQ
@SmallHedgeHQ 3 месяца назад
Thank you so much!!
@blindsidedgames
@blindsidedgames 4 месяца назад
Man, I didn't know I could reference instanced non static methods that way. Works with variables too I like that. You taught me much today Senpai.
@HarrenTonderen
@HarrenTonderen 3 месяца назад
Nice! Btw one thing i like to add with audio players is random pitch - usually storing it as Vector2 (so X/Y are min/max, 1f/1f as default) and change AudioSource's pitch with random range when play function is called. Small but fun thing, however unsure how it affects perfomance in any case..
@SmallHedgeHQ
@SmallHedgeHQ 3 месяца назад
That is a great idea! It would definitely make the sounds feel more authentic.
@rofu8096
@rofu8096 4 месяца назад
I FOUND A FUCKING GEM THANK YOU GEM
@theswiftbuilds
@theswiftbuilds 4 месяца назад
this is awesome, i wish i knew this earlier! you earned a sub :)
@Anerisian
@Anerisian 4 месяца назад
This seems really good, but I think the soundlist step, if not the enum should be scriptable objects.
@SmallHedgeHQ
@SmallHedgeHQ 4 месяца назад
Yeah, an array of scriptable objects would also work.
@pablovillegas2898
@pablovillegas2898 28 дней назад
Nice video but i have a problem, How can I lower the volume of the walking sound independently?, my walking sound is very loud and I would like to decrease it without altering the others
@SmallHedgeHQ
@SmallHedgeHQ 26 дней назад
I actually found this exact issue! On the GitHub link, you can now change each sound volume in the Unity inspector, as well as its audio mixer. So the sound manager shown in the video is a little bit outdated.
@pablovillegas2898
@pablovillegas2898 25 дней назад
@@SmallHedgeHQ Oh, ok i'll try it
@jaulloa21
@jaulloa21 3 месяца назад
The light flicker asset is simply a spotlight that dims on and off. :} 😅
@SmallHedgeHQ
@SmallHedgeHQ 3 месяца назад
xD. I should ask the developer to add more features! Its selling point is it’s completely customisable. You can flicker colour, flicker materials, add sound, and trigger events all in just one state. You can add an infinite amount of these states that do anything you want. I genuinely use this asset in most of my projects because of how versatile it is! Would recommend checking out the tutorial video on the Unity Asset Store to see all the features :)
@kunal-ko
@kunal-ko 4 месяца назад
You're a genius
@LotionSoronarr
@LotionSoronarr 4 месяца назад
Why not use Scriptable Objects? Sounds lists in scriptable objects. Every characters gets it's own sound list.
@weckar
@weckar 3 месяца назад
Depending on application. This is more generic, and requires fewer additional assets as overhead.
@weckar
@weckar 3 месяца назад
Wait. People do that? Make a sound source for every sound? What? You have got to be joking right?
@renarsgrams
@renarsgrams 3 месяца назад
Yes, I do. 😄 That's what happens when you learn something new. It was a way I could think of to play five sounds at the same time for one object. But now I will try this way.
@darkman237
@darkman237 3 месяца назад
Could you refactor this to use unity events?
@SmallHedgeHQ
@SmallHedgeHQ 3 месяца назад
100%. The only prerequisite is the Play() method can not have more than 1 parameter. Could potentially create a scriptable object which holds Sounds enum and Volume, then pass in that.
@darkman237
@darkman237 3 месяца назад
@@SmallHedgeHQ In order to keep the sound enum and volume would have to be set dirty between plays
@AliHosseiniDev
@AliHosseiniDev 4 месяца назад
Meh. just use scriptable objects.
@Clovenweb
@Clovenweb 5 дней назад
tbh just used first part of video🤣
@RoxGame
@RoxGame 4 месяца назад
can this system play background music while playing another sound effects using one audio source !
@SmallHedgeHQ
@SmallHedgeHQ 4 месяца назад
This SoundManager is optimised for event-based sound effects. Such as playing a sound when criteria are met. For background music, I have a couple of suggestions. 1. Create a separate audio source and set it to looping. When the music needs to be triggered, call AudioSource.Play() and AudioSource.Stop() when it needs to stop. 2. Change the play method to SoundManager.Play(Sounds sound, float volume, bool looping). Then if looping is true, create a Coroutine which calls SoundManager.Play() again after the duration of the audio clip. Of course with this way, you’ll need a way to stop the looping, so there’ll need to be a new Stop() method which interrupts the Coroutine. I would strongly recommend #1. Unless you are looking to use the SoundManager script to manage all the sound/music in your project. I think the best way is a hybrid approach.
Далее
They made a game about philosophy...
23:19
Просмотров 404 тыс.
Gelik yoki Velik?
00:20
Просмотров 1,1 млн
Making a Game with Java with No Experience
8:41
Просмотров 172 тыс.
Build Procedural UI with Callbacks and Manipulators
28:14
How To Fail At Game Feel
3:48
Просмотров 67 тыс.
Installing The Sonic Drive-In Operating System
36:26
Просмотров 245 тыс.
100 DEVS Make a GAME without COMMUNICATING! (1-25)
17:14
20 Advanced Coding Tips For Big Unity Projects
22:23
Просмотров 175 тыс.
A new way to generate worlds (stitched WFC)
10:51
Просмотров 523 тыс.