Search Unity

Resolved How to open a folder dialog with WebGL to browse folders

Discussion in 'Web' started by MTprn82, Nov 24, 2022.

  1. MTprn82

    MTprn82

    Joined:
    Mar 17, 2022
    Posts:
    6
    On an application built with WebGL, I want to open a dialog to select a local folder and access all files in it.

    Currently I am developing based on UnityStandaloneFileBrowser. I can access each file, but when I try to access a folder, I get problems.

    I would like to know if there is a way to access local folders on WebGL, not just UnityStandaloneFileBrowser, without problems.

    Thanks!
    Tsubasa
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
  3. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,975
    Those file browsers are by nature platform specific. It is relatively easy to add a Windows file open dialog through pinvoke but then that part of the app won‘t work on any other platform.
     
    MTprn82 likes this.
  4. MTprn82

    MTprn82

    Joined:
    Mar 17, 2022
    Posts:
    6
    dear mgear, CodeSmile
    Thank you for your replies!

    I was trying to run it on iOS, but apparently it was not supported.
     
  5. sumpfkraut

    sumpfkraut

    Joined:
    Jan 18, 2013
    Posts:
    242
    instead to get all files in a folder, i would zip the files, and then you can select the zip file directly.
     
  6. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    547