- Home /
How to stop just one AudioClip?
I try to break up an AudioClip so I tried to use audio.Stop(); But if I start my game I can't hear any other sound in this scene because of the function stop();.
Is there any way to stop just one special sound like audio.stop(myAudioClip);?
So this is my script:
public AudioClip sound01;
public AudioClip sound02;
void Update () {
if(itemManager.playSound01==true)
{
audio.PlayOneShot(sound01);
itemManager.playSound01=false;
}
if(itemManager.item01==false)
{
audio.Stop();
}
if(itemManager.playSound02==true)
{
audio.PlayOneShot(sound02);
itemManager.playSound02=false;
}
if(itemManager.item02==false)
{
audio.Stop();
}
}
Comment
Your answer
Follow this Question
Related Questions
Stopping AudioClip/AudioSource C# 0 Answers
It is possible to start a streaming AudioClip not from the beginning ? 1 Answer
Audio loops too early 2 Answers
Stop sound on input.getkeyup 1 Answer
www.getAudioClip() Bug: One Second being cut off MP3. 2 Answers