Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Retrieve multiple files from cloud directory(or web directory in general)

Discussion in 'Scripting' started by antoniskamzel, Apr 29, 2021.

  1. antoniskamzel

    antoniskamzel

    Joined:
    Feb 18, 2020
    Posts:
    25
    Hello,
    I want to retrieve multiple files from a web directory (such as a cloud storage bucket) but after a lot of research i can't find a solution. To be more specific.
    I have 5 images into a cloud bucket. I want to be able to retrieve all 5 of them somehow and put them as textures to dynamically created buttons into my project. Or at least i want to download all of them and put them into an array or something. I've tried http web request and response with stream reader and regex and match collection but it doesn't seem to be working with cloud storage
    Any help at this point would be highly appreciated!
    Thanks!
     
    badplastics likes this.
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,144
    Either you can use UnityWebRequest or if the cloud storage has a special API, you can use that. Depends on your cloud storage as they sometimes function differently based on what they have setup.
     
  3. antoniskamzel

    antoniskamzel

    Joined:
    Feb 18, 2020
    Posts:
    25
    Can a get directory listing with UnityWebRequest? Cause I only have found docs about downloading one file.
     
    badplastics likes this.
  4. badplastics

    badplastics

    Joined:
    Jul 4, 2018
    Posts:
    4
    Hey all, attempting to accomplish the exact same thing as OP. Any help would be much appreciated!
     
  5. jpgordon00

    jpgordon00

    Joined:
    Jan 9, 2021
    Posts:
    25