Here it is my code: https://pastebin.com/n4dQf7WW
Basically my problem is the fact that I download something like 10/15 images in one time to fill my homepage. But generating all these images will freeze the app on both iOS and Android.
More facts: - On iOS the download won't start immediately, on Android does. - I used the UnityWebRequest functions, but on iOS it won't work concurrently. - On Android it works as it should be, but when it comes to create the Sprite/Texture it freezes until it's finished.
So what I'm asking is if there is a way to handle better this situation (even with third-party library both paid and free).
I think the problem is here on the WebClient_DownloadDataCompleted function:
var texture = new Texture2D(2, 2);
texture.LoadImage(imageBytes);
Rect rec = new Rect(0, 0, texture.width, texture.height);
var spriteToUse = Sprite.Create(texture, rec, new Vector2(0.5f, 0.5f), 100);