- Home /
Question by
Panthesilea · Feb 02, 2014 at 08:30 PM ·
coroutinedownloadimages
Download multiple textures
I write an app that download images from internet. I use coroutines to downloading these images. I call coroutines in a loop. Is efficient this method or I must download images sequentially?
private void StartDownloading(List<Image> thumbnails)
{
isImageDownloaded = new bool[thumbnails.Count];
textures = new Texture2D[thumbnails.Count];
isDownloading = true;
for (int i = 0; i < thumbnails.Count; i++)
{
StartCoroutine(DownloadThumbnail(thumbnails[i], i));
}
}
Comment
It looks like most web browsers do anywhere from 2 to 10 concurrent connections per domain. I would say as long as you aren't doing a ton of images at once this is probably fine. But don't guess, test.
Your answer
Follow this Question
Related Questions
Downloading images and text files from server. 3 Answers
WWW class downloading image doesn't work in Web Player? 1 Answer
Particle Effects Stuttering Issue 1 Answer
How to download an image and stock it on the device in C# ? 0 Answers
Download and save images into local phone storage makes the app hang 1 Answer