Skip to content

A plugin to use native file browser in Unity on any compatible platform.

License

Notifications You must be signed in to change notification settings

Profy/Unity-UniversalFileBrowser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity Universal File Browser

The goal of this project is to provide a collection of libraries and a wrapper to access the native file browser on all platforms compatible with Unity.

Supported platforms:

  • Windows: Supported
  • Linux: Not Implemented
  • MacOS: Not Implemented
  • iOS: Not Implemented
  • Android: Not Implemented
  • UWP: Not Implemented
  • WebGL: Not Implemented

Supported configurations:

  • Scripting Backend: Mono/IL2CPP
  • API Compatibility Level: .NET Standard/.NET Framework
  • Managed Stripping Level: Disabled/Low/Medium/High

Any help or suggestion is welcome.

Download Package

Features

  • File dialog (single select, multi select, filters)
  • Folder dialog (single select, multi select)
  • Save dialog (overwrite, filters)
  • Open file browser
  • Open file with default program
  • Start an external process

Usage

File dialog

string path = UniversalFileBrowser.SingleFileDialog("Title", directory: null, filters);
UnityEngine.Debug.Log(path == null ? "Dialog cancelled" : path);

Folder dialog

string path = UniversalFileBrowser.SingleFolderDialog("Title", directory: null);
UnityEngine.Debug.Log(path == null ? "Dialog cancelled" : path);

Save dialog

string path = UniversalFileBrowser.SingleFolderDialog("Title", directory: null, filters);
UnityEngine.Debug.Log(path == null ? "Dialog cancelled" : path);

Filters

Filter[] filters = new[]
{
    new Filter("JPEG", "jpg", "jpeg" ),
    new Filter("PNG", "png" ),
    new Filter("All Files", "*" )
};

File browser

UniversalFileBrowser.Browser(directory: Application.dataPath);

Open file

string path = UniversalFileBrowser.SingleFileDialog("Title", directory: null);
UniversalFileBrowser.Open(path);

External process

string path = UniversalFileBrowser.SingleFileDialog("Title", directory: null);
UniversalFileBrowser.StartProcess(path);

Screenshots

Special thanks

About

A plugin to use native file browser in Unity on any compatible platform.

Resources

License

Stars

Watchers

Forks

Packages

No packages published