public void onSelect() { if (UnityEngine.Application.platform == RuntimePlatform.Android) { //要求API level 21 AndroidFilePicker.PickFolder((path) => { ConfigUtility.persistentDataPath = path; //AndroidTool.MakeToast("路徑:" + path); }); } else { var openFolder = OpenFolder.Open( "請選擇一個資料夾" ); var result = openFolder.ShowDialog(); if (result == DialogResult.OK) { var path = openFolder.SelectedPath; ConfigUtility.persistentDataPath = path; //print(path); } } }
public void openPickFolder() { if (UnityEngine.Application.platform == RuntimePlatform.Android) { //要求API level 21 AndroidFilePicker.PickFolder(callback); } else { var openFolder = OpenFolder.Open( "請選擇一個資料夾" ); var result = openFolder.ShowDialog(); if (result == DialogResult.OK) { var folderName = openFolder.SelectedPath; print(folderName); } } }
public void openPickFile() { if (UnityEngine.Application.platform == RuntimePlatform.Android) { AndroidFilePicker.PickFile(callback); } else { var openFile = OpenFile.Open( "請選擇一個資料夾", ConfigUtility.persistentDataPath, "All Files\0*.*\0\0", "" ); if (DllOpebFile.GetOpenFileName(openFile)) { if (!string.IsNullOrEmpty(openFile.file)) { print(openFile.file); } } } }
public void openPickImage() { AndroidFilePicker.PickImage(callback); }
public void openPickAudio() { AndroidFilePicker.PickAudio(callback); }