I have problem restarting my audio from pause. I have used the following script
var movTexture : MovieTexture;
var aud : AudioSource;
function OnGUI()
{
GUI.DrawTexture(Rect(0,0,Screen.width,Screen.height),movTexture);
}
function Start () {
movTexture.Play();
} function Update() { if(Input.GetKeyDown(KeyCode.Space)) { movTexture.Pause(); aud.Stop(); } if(Input.GetKey("p")) { movTexture.Play(); aud.Play(); } }
But when i hit 'p' ,The video plays from the point it stopped but audio starts playing from the beginning.I need it play from the pint where it stopped.Can any one help me???