Is there a way to access two audio source components from one script and have them play at the same time?
The two audio components are on one object. Thanks
Is there a way to access two audio source components from one script and have them play at the same time?
The two audio components are on one object. Thanks
Public Audiosource audio1,audio2;
audioclip ac1,ac2;
void start()
{
ac1 = Resources.Load(“(audioname)”);
audio1.PlayOneShot (ac1); // playoneshot will play one time
ac2 = Resources.Load(“(audioname)”);
audio2.Play (ac2); // play will play loop times
}
void Update()
{
}