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();
}
}