No video

Unity - Play A Sound Effect With Button Click (2022) | EASY Unity Tutorial

  Рет қаралды 36,679

xxRafael Productions - Rafael Vicuna

xxRafael Productions - Rafael Vicuna

Күн бұрын

Пікірлер: 26
@Leoshinoya
@Leoshinoya 2 жыл бұрын
straight to the point, really like it!
@bajagainsatish4828
@bajagainsatish4828 Жыл бұрын
absolutely great, it really helped me in my work thank you man!!!
@mrmachinehead8059
@mrmachinehead8059 Жыл бұрын
Great tutorial, quick, easy to follow. :)
@loxxi8433
@loxxi8433 11 ай бұрын
Thanks you! love it! I will use this in my future game!!!
@bonfaceosuka
@bonfaceosuka Жыл бұрын
I really appreciate this video
@AMINEI-wl9rk
@AMINEI-wl9rk 3 ай бұрын
public class PlaySound : MonoBehaviour { public AudioSource soundPlayer; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } public void PlayThisSoundEffect() { soundPlayer.Play(); } }
@yuchenz1496
@yuchenz1496 Жыл бұрын
Great video!!! But please make sure you didnt "Mute Audio" while play (in the Game scene)
@Generaal_Quinten
@Generaal_Quinten 4 ай бұрын
keybord a lil bit loud but further its okey
@lightbending
@lightbending 2 жыл бұрын
thanks for the video! :D when i was following the tut, i tried dragging in the AudioSource empty as a reference to the button instead. i.e. I was able to make an onclick referencing the audiosource and play it, bypassing the use of a script. is there are reason to set it up with a script over referencing the empty audiosource component?
@brandonkeller16
@brandonkeller16 Жыл бұрын
there's not really a difference I never script for button audio just drag the audio source that's parented to your button into the on click then select playoneshot and then drag the sound you want into the click event its a lot faster to setup and its the same as making a method In a script that calls "sound.Play(); or PlayOneShot(), ect.
@aleksboboychev
@aleksboboychev Жыл бұрын
Cheers Boss!
@gozcu4
@gozcu4 Жыл бұрын
Super good
@OmairAhmad4772
@OmairAhmad4772 9 ай бұрын
Hello, Sir I want When I Release the button it will automatically becomes Pause().. How can I Do that can You Please Help me with that //Running Sound public void playjump() { footStepSound.enabled = false; SprintSound.Pause(); jumpSound.Play(); }
@alekisdriving6374
@alekisdriving6374 2 жыл бұрын
Thx
@pungkizulkarnain1878
@pungkizulkarnain1878 Жыл бұрын
Bagaimana agar format musiknya tidak terditeksi oleh game trsebut?
@jcarpio5410
@jcarpio5410 Жыл бұрын
the sound fx will not turn off when I click the button again?
@Piter001
@Piter001 Жыл бұрын
It works fine, but I have a problem that the sound also turns on when I turn on the scene. I turn on the game and the sound comes along with it. How to fix it?
@BiancaTasso-do7qz
@BiancaTasso-do7qz 5 ай бұрын
On the AudioSource you have to make sure that the "Play on Awake" is disabled :]
@unwrittenarchivesthehallways
@unwrittenarchivesthehallways Жыл бұрын
i rly like the sound effect u showed of the button!! but mine doesnt work. i try to place it on the player :( when player clicks on itself (the playable character is a creature) it makes noise :D that's what's supposed to happen atleast
@jackcard4986
@jackcard4986 Жыл бұрын
oh that poor keyboard
@X1th
@X1th Жыл бұрын
what if the scene will change after pressing the button? How to solve the problem?
@Buddyboy246
@Buddyboy246 Жыл бұрын
Do you have solution now?
@RahmadHadi10
@RahmadHadi10 Жыл бұрын
i know bro, click your button, and use event trigger on inspector, and add event type "Select" and drag your audio source
@RahmadHadi10
@RahmadHadi10 Жыл бұрын
read my reply @@Buddyboy246
@ramadhanidwinoviansyah
@ramadhanidwinoviansyah 2 ай бұрын
@@RahmadHadi10 bisa lebih detail ga bang? ini button pindah scene dipakein sound malah kepotong gitu soundnya.
@jerstin2442
@jerstin2442 2 ай бұрын
@@RahmadHadi10 OH MY GOD THANK YOU
Adding BGM And On/Off Sound Button - Easy Unity Tutorial
5:56
How To Add Sound Effects the RIGHT Way | Unity Tutorial
15:21
Sasquatch B Studios
Рет қаралды 30 М.
Logo Matching Challenge with Alfredo Larin Family! 👍
00:36
BigSchool
Рет қаралды 22 МЛН
Мы сделали гигантские сухарики!  #большаяеда
00:44
They made a game about philosophy...
23:19
Real Civil Engineer
Рет қаралды 458 М.
Uncover the Simple Trick to KEEP MUSIC PLAYING Between Scenes!
4:42
Better Coding in Unity With Just a Few Lines of Code
15:27
Firemind
Рет қаралды 307 М.
I Tried To Beat Minecraft Backwards
18:53
Contraption8or
Рет қаралды 1,4 МЛН
I forced EVERYONE to use Linux
22:59
NetworkChuck
Рет қаралды 436 М.
Can AI code Flappy Bird? Watch ChatGPT try
7:26
candlesan
Рет қаралды 9 МЛН
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,5 МЛН
I Wish I Had Known This Before I Started Unity Game Development...
11:11
Unity - Play Sound Effect During Collision (OnCollisionEnter2D) | EASY Unity Tutorial
6:12
xxRafael Productions - Rafael Vicuna
Рет қаралды 32 М.
Logo Matching Challenge with Alfredo Larin Family! 👍
00:36
BigSchool
Рет қаралды 22 МЛН