/UnityFileBrowser

A native file browser for Unity

Primary LanguageC#MIT LicenseMIT

Unity File Browser

GitHub package.json version (branch) GitHub GitHub issues

Note This package is still in development and may not be stable. Use at your own risk. Linux support is not yet implemented.

A simple package for Unity that allows you to open files and folders using the default file browser on the target device. It supports Windows, Mac and Linux and works both in the editor and at runtime.

Installation

You can install the package via the Unity Package Manager by adding the following line to your manifest.json file located within your project's Packages directory:

"dev.kalucky0.filebrowser": "https://github.com/kalucky0/UnityFileBrowser.git#upm"

or by using Package Manager window and selecting "Add package from git URL..." option and pasting the link to this repository.

Read more about Git dependencies in Unity Package Manager documentation.

Usage

// Open a file browser to select a file
var paths = FileBrowser.OpenFileBrowser(new[] { "png", "jpg" });

// Open a file browser to select a folder
var paths = FileBrowser.OpenFolderBrowser();

// Open a file browser to select a save location
var paths = FileBrowser.OpenSaveFileBrowser(new[] { "png", "jpg" });

Read more about the API in the documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.