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
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. :)
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 !!
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!!
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!
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!
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.
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:)
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;
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.
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?
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.
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
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. :)
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 !!
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!!
i also have to say the same
You saved my skin with this, thank you so much!!
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!
This is a very useful supplement!
Thank you so much for this!
Deus te abençoe amigo, ajudou muito! ❤
Thank you! exactly what I was looking for. gonna use this to swap between combat action loop and ambient music. keep it up
Simple and effective. Thank you!
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!
Thank you sir, this helped me figure out how to swap audio when loading the game.
yup hard cut etc annoyed much, this Awesome been search the methods for days, fantastic ty Dude :)
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.
Beautiful video! thank you!
Amazing tutorial, helped a lot!
Love this
this is amazing! thank you so very much
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:)
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();
}
}
}
Awesome! Thank you so much!
Very helpful, thanks!
Thanx man.
Marc:)
Awesome!
How would you loop the audio source?
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.
Thank you! )
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?
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.
@@BuffaloMuff Thank you very much. I will try this out.
my default ambiance is not coming
in my audio manager, i cannot find any section to place audio
make sure its set to public.
Great tutorial 👍
comp 3 interactives tutorials are the best
Uncle Bob would be sad and Tpikies also
discord mod
Would be so cool if you get to the point real quick in the video
You're the worst, he's explaining why he's doing things, so we can learn, instead of just copy pasting.
top tier tutorial, thanks for this, subscribed.
Top tier commenter, thanks for this, hearted
Great tutorial... Thank you!