UnityStandaloneFileBrowser
1.2: Merge pull request #47 from RicardoEPRodrigues
Windows/Mac/Linuxのネイティブファイルダイアログのシンプルなラッパー。
パッケージをダウンロードします
使用例:
// Open file
var paths = StandaloneFileBrowser . OpenFilePanel ( "Open File" , "" , "" , false ) ;
// Open file async
StandaloneFileBrowser . OpenFilePanelAsync ( "Open File" , "" , "" , false , ( string [ ] paths ) => { } ) ;
// Open file with filter
var extensions = new [ ] {
new ExtensionFilter ( "Image Files" , "png" , "jpg" , "jpeg" ) ,
new ExtensionFilter ( "Sound Files" , "mp3" , "wav" ) ,
new ExtensionFilter ( "All Files" , "*" ) ,
} ;
var paths = StandaloneFileBrowser . OpenFilePanel ( "Open File" , "" , extensions , true ) ;
// Save file
var path = StandaloneFileBrowser . SaveFilePanel ( "Save File" , "" , "" , "" ) ;
// Save file async
StandaloneFileBrowser . SaveFilePanelAsync ( "Save File" , "" , "" , "" , ( string path ) => { } ) ;
// Save file with filter
var extensionList = new [ ] {
new ExtensionFilter ( "Binary" , "bin" ) ,
new ExtensionFilter ( "Text" , "txt" ) ,
} ;
var path = StandaloneFileBrowser . SaveFilePanel ( "Save File" , "" , "MySaveFile" , extensionList ) ;より詳細な例については、サンプル/basicsamplescene.unityを参照してください。
Macスクリーンショット
Windowsスクリーンショット
Linuxスクリーンショット
注:
Windows


マック
webgl:
ライブデモ:https://gkngkc.github.io/