Audio doesnt play in the phone but play on the editor
So i have this code,
public class TextoToAudio : MonoBehaviour {
public AudioSource _audio;
public string textoATocar;
// Use this for initialization
void Start () { _audio = gameObject.GetComponent (); }
public void tocaIsso( string audioTocar){
StartCoroutine( DownloadAudio( audioTocar ) );
}
IEnumerator DownloadAudio( string textoATocar2 ){
string url = "http://translate.google.com/translate_tts?ie=UTF-8&total=1&idx=0&textlen=32&client=tw-ob&q=" + textoATocar2 + "&tl=Pt-gb";
WWW www = new WWW(url);
yield return www;
_audio.clip = www.GetAudioClip( false, true, AudioType.MPEG );
_audio.Play();
} }
I call the TocaIsso in another class, in the editor it works fine, but it does not work at all in the phone.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612135719im_/https://answers.unity.com/themes/thub/images/avi.jpg)