How to Fade Between Audio Tracks [Unity Tutorial]

  Рет қаралды 17,205

Comp-3 Interactive

Comp-3 Interactive

Күн бұрын

Пікірлер: 43
@bicoders4215
@bicoders4215 3 жыл бұрын
This Is Just What I Wanted I Knew You Will Gimme That.. Music Transistions was something i was searching for just 2 days ago and its good to be the first viewer
@CRUMVIII
@CRUMVIII 3 жыл бұрын
Just wanted to say, I only subbed recently after watching a first video which helped me considerably but glad I did cos this one's another winner too. :)
@HarisLoufopoulos
@HarisLoufopoulos 2 жыл бұрын
i am trying to make a sound game in unity and i am using different atmospheres, outdoors, underwater, cave ambiences...this guy really saved my project with this video, completely pro my friend !! subscribed and i want to see more from you !!
@AliceRubyC
@AliceRubyC 3 ай бұрын
You saved my skin with this, thank you so much!!
@madduckling4436
@madduckling4436 3 жыл бұрын
hello comp-3 interactive I wanna thank you for all the videos you're making I'm really not the best in making games and I definitely suck at making games even tho I have great ideas...but your videos are helpful easy to understand and beginner friendly....THANK YOU ALOT MATE!!
@bicoders4215
@bicoders4215 3 жыл бұрын
i also have to say the same
@sheldorinolive6100
@sheldorinolive6100 3 жыл бұрын
Great tutorial! I realized that my audio wasn't looping, so I changed a chunk of your script from THIS: private void Start() { track01 = gameObject.AddComponent(); track02 = gameObject.AddComponent(); isPlayingTrack01 = true; SwapTrack(defaultAmbience); } to THIS instead: private void Start() { track01 = gameObject.AddComponent(); track01.loop = true; track02 = gameObject.AddComponent(); track02.loop = true; isPlayingTrack01 = true; SwapTrack(defaultAmbience); } By adding the "track01.loop = true; " and "track02.loop = true;" lines, the Audio Sources will loop. Hope that helps anyone who runs into the same issue. I learned a LOT from this video!
@FONORX
@FONORX 2 жыл бұрын
This is a very useful supplement!
@SeaFoamStrat
@SeaFoamStrat 2 жыл бұрын
Thank you so much for this!
@MDzayaJVF
@MDzayaJVF Жыл бұрын
Deus te abençoe amigo, ajudou muito! ❤
@Dylawa
@Dylawa 2 жыл бұрын
I know I'm a year late, but I've followed this tutorial step by step, and I continue to get a missing semicolon error when editing the second half of the AudioManager code to insert the IEnumerator. When I try to put in the "missing" semicolon, I then get a syntax error where I'm being told I'm missing a ,. Has C# or Unity had any major changes since this tutorial that might be the cause of this? Because I've gone over this code line for line, and I can't find anything I have done differently. EDIT: after painstakingly saving step by step, I found that the issue is with the very last line typed: Comp-3 types "StartCoroutine(FadeTrack(newClip)0)", when it should be "StartCoroutine(FadeTrack(newClip));". Just for anyone else who was having a nightmare of a time like me.
@SpyderLabGaming
@SpyderLabGaming 6 ай бұрын
Simple and effective. Thank you!
@mendalosindiedevrpg8084
@mendalosindiedevrpg8084 2 жыл бұрын
Thank you! exactly what I was looking for. gonna use this to swap between combat action loop and ambient music. keep it up
@PVJStudio
@PVJStudio 2 жыл бұрын
yup hard cut etc annoyed much, this Awesome been search the methods for days, fantastic ty Dude :)
@throkgul
@throkgul 3 жыл бұрын
Thank you sir, this helped me figure out how to swap audio when loading the game.
@jtlewis81
@jtlewis81 2 жыл бұрын
This was very helpful! I'm working on a 2D map that has 5 different "biomes", or terrain zones, each of which gets a different background soundtrack. Before looking up how to fade the audio, I already had setup the zones with polygon colliders as triggers, and I had the track swapping working, though it was abrupt. I thought that a coroutine would be the way to do the fade, and this little tutorial made it very easy. Thanks!
@MadMarcWinnipeg
@MadMarcWinnipeg Жыл бұрын
Question: Do you have these scripts available for download or copy/paste? I just want to have a good look at it to understand it better and modify my scripts. Thanx Marc:)
@TFCau
@TFCau 2 жыл бұрын
With the audio swap script its not working heres mine can u tell me whats wrong using System.Collections; using System.Collections.Generic; using UnityEngine; public class AudioSwap : MonoBehaviour { public AudioClip newTrack; private void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { AudioManager.instance.SwapTrack(newTrack); } } private void OnTriggerExit(Collider other) { if (other.CompareTag("Player")) { AudioManager.instance.ReturnToDefault(); } } }
@Killaisking9999
@Killaisking9999 Жыл бұрын
How would you loop the audio source?
@shiluram4063
@shiluram4063 3 жыл бұрын
Love this
@eldelnacho
@eldelnacho 2 жыл бұрын
Beautiful video! thank you!
@jazzy_rey
@jazzy_rey 2 жыл бұрын
second audio is getting stuck and doesn't continue playing but when i go back to the other ambiance it works fine, i already got 2 days trying to fix it but there is no source out here to fix Unity's audio mistakes.
@MadMarcWinnipeg
@MadMarcWinnipeg Жыл бұрын
Thanx man. Marc:)
@420basco
@420basco 3 жыл бұрын
this is amazing! thank you so very much
@LukaJankovic
@LukaJankovic 3 жыл бұрын
Amazing tutorial, helped a lot!
@hex6206
@hex6206 3 жыл бұрын
Awesome!
@brauliojorgealmeida
@brauliojorgealmeida 2 жыл бұрын
Awesome! Thank you so much!
@monochromo81
@monochromo81 2 жыл бұрын
Hi there. Thanks again for this. Do you see any way that we can use an "Audio Source" object instead of an "Audio Clip" in the Audio Swap? If adding a clip, there is no way to access audio settings (for example Volume or pitch) because the corresponding Audio Source object is created only in play mode, am I getting this right?
@BuffaloMuff
@BuffaloMuff 2 жыл бұрын
Few simple things to let you handle that.Get rid of the instantiate, and add script to game object. Then make the 2 audio sources public. Then you can assign what audio sources you want and directly control all the options on them before hand.
@monochromo81
@monochromo81 Жыл бұрын
@@BuffaloMuff Thank you very much. I will try this out.
@demonking2526
@demonking2526 3 жыл бұрын
Very helpful, thanks!
@syedeahsanurrahman1670
@syedeahsanurrahman1670 2 жыл бұрын
my default ambiance is not coming in my audio manager, i cannot find any section to place audio
@BuffaloMuff
@BuffaloMuff 2 жыл бұрын
make sure its set to public.
@AlexandrGlumov
@AlexandrGlumov 3 жыл бұрын
Thank you! )
@lukastomasek8038
@lukastomasek8038 3 жыл бұрын
Great tutorial 👍
@bicoders4215
@bicoders4215 3 жыл бұрын
comp 3 interactives tutorials are the best
@kerbi987
@kerbi987 Жыл бұрын
Uncle Bob would be sad and Tpikies also
@MohammadHashem-o8w
@MohammadHashem-o8w 11 ай бұрын
discord mod
@TheFFireWasHere
@TheFFireWasHere Жыл бұрын
Would be so cool if you get to the point real quick in the video
@NorcVI
@NorcVI Жыл бұрын
You're the worst, he's explaining why he's doing things, so we can learn, instead of just copy pasting.
@ShakeyDBD
@ShakeyDBD 2 жыл бұрын
top tier tutorial, thanks for this, subscribed.
@comp3interactive
@comp3interactive 2 жыл бұрын
Top tier commenter, thanks for this, hearted
@monochromo81
@monochromo81 2 жыл бұрын
Great tutorial... Thank you!
How To Add Sound Effects the RIGHT Way | Unity Tutorial
15:21
Sasquatch B Studios
Рет қаралды 47 М.
How to Manage In-Game Time [Unity Tutorial]
16:11
Comp-3 Interactive
Рет қаралды 25 М.
Wall Rebound Challenge 🙈😱
00:34
Celine Dept
Рет қаралды 22 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 10 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 40 МЛН
How to make AWESOME Scene Transitions in Unity!
19:45
Brackeys
Рет қаралды 964 М.
Introduction to AUDIO in Unity
14:26
Brackeys
Рет қаралды 1 МЛН
PLEASE use a Unity SOUND MANAGER! - Full Tutorial
15:58
Small Hedge Games
Рет қаралды 13 М.
Easy Ammo & Reloading System in Unity
7:48
BMo
Рет қаралды 11 М.
THIRD PERSON MOVEMENT in Unity
21:05
Brackeys
Рет қаралды 1,5 МЛН
Traffic AI In Unity | Simple Traffic System
15:30
coding edge (pablos lab)
Рет қаралды 20 М.
How to make an Audio System in Unity | Unity + FMOD Tutorial
49:37
Shaped by Rain Studios
Рет қаралды 60 М.
How to Add a Field of View for Your Enemies [Unity Tutorial]
23:45
Comp-3 Interactive
Рет қаралды 91 М.
Wall Rebound Challenge 🙈😱
00:34
Celine Dept
Рет қаралды 22 МЛН