Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Downloading Multiple Files at a Time

Discussion in 'Scripting' started by jpgordon00, Feb 5, 2021.

  1. jpgordon00

    jpgordon00

    Joined:
    Jan 9, 2021
    Posts:
    25
    A few weeks ago I was looking for a way to download multiple files at a time. Unity does not have a way to do this.

    I created a single class that allows you to download any amount of files.

    Think of it as a replacement to DownloadHandler.

    My downloader is atomic, meaning you can set a property and it will stop and cleanup upon failure. It has easy success and failure callbacks with C# events. It uses an IEnumerator to download files one at a time. It keeps tracks of time, errors, when its complete and more. It downloads the files one by one so you can have literally thousands of files to download.




    I hope one of you finds it of use.

    https://github.com/jpgordon00/UnityGroupDownloader
     
    Last edited: Feb 9, 2021
  2. jpgordon00

    jpgordon00

    Joined:
    Jan 9, 2021
    Posts:
    25
    Updated this to include a simple component.
     
  3. jpgordon00

    jpgordon00

    Joined:
    Jan 9, 2021
    Posts:
    25
    Updated this so it now downloads files concurrently at a specified rate at maximum. For example, I use this in an iOS app to download 8 files at the same time, thus I can download hundreds of files extremely quickly.