I am having trouble downloading pictures on my mobile devices.
I use this code for downloading down below:
public IEnumerator DownloadImageRaw(string MediaUrl, RawImage poster)
{
UnityWebRequest request = UnityWebRequestTexture.GetTexture(MediaUrl);
request.SendWebRequest();
if (request.isNetworkError || request.isHttpError)
{
poster.texture = Resources.Load<Texture2D>("images/NoPoser");
Debug.Log(request.error);
yield break;
}
else
{
poster.texture = ((DownloadHandlerTexture)request.downloadHandler).texture;
}
}
Link B: http://www.subzerone.com/nfp/poser/1.jpg
if I use "Link A" for MediaUrl, working in all devices (Unity Editor,Nox Player,My Mobile Phone).
But "Link B" just doesn't work on my mobile phone.
"Link B" Work perfect on Unity Editor and Nox Player.
What am I doing wrong?
Problem is Unity 2018 Versions.
i upgraded my project 2019. problem is solved.