2using System.Collections.Generic;
12 new StandaloneFileBrowserMac();
13 #elif UNITY_EDITOR_LINUX
15 new StandaloneFileBrowserLinux();
16 #elif UNITY_EDITOR_WIN
18 new StandaloneFileBrowserWindows();
25 new StandaloneFileBrowserWinRT();
28 new StandaloneFileBrowserAndroid();
31 new StandaloneFileBrowserWebGL();
32 #elif UNITY_STANDALONE_OSX
34 new StandaloneFileBrowserMac();
37 new StandaloneFileBrowserIOS();
38 #elif UNITY_STANDALONE_WIN
40 new StandaloneFileBrowserWindows();
41 #elif UNITY_STANDALONE_LINUX
43 new StandaloneFileBrowserLinux();
56 public static IList<ItemWithStream>
OpenFilePanel(
string title,
string directory,
string extension,
59 var extensions =
string.IsNullOrEmpty(extension) ? null :
new[] {
new ExtensionFilter(
"", extension)};
60 return OpenFilePanel(title, directory, extensions, multiselect);
74 return _platformWrapper.OpenFilePanel(title, directory, extensions, multiselect);
85 public static void OpenFilePanelAsync(
string title,
string directory,
string extension,
bool multiselect,
86 Action<IList<ItemWithStream>> cb)
88 var extensions =
string.IsNullOrEmpty(extension) ? null :
new[] {
new ExtensionFilter(
"", extension)};
101 bool multiselect, Action<IList<ItemWithStream>> cb)
103 _platformWrapper.OpenFilePanelAsync(title, directory, extensions, multiselect, cb);
113 public static IList<ItemWithStream>
OpenFolderPanel(
string title,
string directory,
bool multiselect)
115 return _platformWrapper.OpenFolderPanel(title, directory, multiselect);
126 Action<IList<ItemWithStream>> cb)
128 _platformWrapper.OpenFolderPanelAsync(title, directory, multiselect, cb);
141 var extensions =
string.IsNullOrEmpty(extension) ? null :
new[] {
new ExtensionFilter(
"", extension)};
142 return SaveFilePanel(title, directory, defaultName, extensions);
156 return _platformWrapper.SaveFilePanel(title, directory, defaultName, extensions);
167 public static void SaveFilePanelAsync(
string title,
string directory,
string defaultName,
string extension,
168 Action<ItemWithStream> cb)
170 var extensions =
string.IsNullOrEmpty(extension) ? null :
new[] {
new ExtensionFilter(
"", extension)};
185 _platformWrapper.SaveFilePanelAsync(title, directory, defaultName, extensions, cb);
Represents a platform-specific file with a Stream.
Represents a platform-specific file browser.
static void OpenFilePanelAsync(string title, string directory, string extension, bool multiselect, Action< IList< ItemWithStream > > cb)
Native open file dialog async
static void OpenFolderPanelAsync(string title, string directory, bool multiselect, Action< IList< ItemWithStream > > cb)
Native open folder dialog async
static ItemWithStream SaveFilePanel(string title, string directory, string defaultName, ExtensionFilter[] extensions)
Native save file dialog
static IList< ItemWithStream > OpenFilePanel(string title, string directory, ExtensionFilter[] extensions, bool multiselect)
Native open file dialog
static void SaveFilePanelAsync(string title, string directory, string defaultName, string extension, Action< ItemWithStream > cb)
Native save file dialog async
static void SaveFilePanelAsync(string title, string directory, string defaultName, ExtensionFilter[] extensions, Action< ItemWithStream > cb)
Native save file dialog async
static IList< ItemWithStream > OpenFolderPanel(string title, string directory, bool multiselect)
Native open folder dialog
static IList< ItemWithStream > OpenFilePanel(string title, string directory, string extension, bool multiselect)
Native open file dialog
static void OpenFilePanelAsync(string title, string directory, ExtensionFilter[] extensions, bool multiselect, Action< IList< ItemWithStream > > cb)
Native open file dialog async
static ItemWithStream SaveFilePanel(string title, string directory, string defaultName, string extension)
Native save file dialog
Represents a series of methods to operate platform-specific file pickers.
Represents a file picker extension filter.