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);
         }
     }
 }
Example #2
0
 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);
         }
     }
 }
Example #3
0
 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);
             }
         }
     }
 }
Example #4
0
 public void openPickImage()
 {
     AndroidFilePicker.PickImage(callback);
 }
Example #5
0
 public void openPickAudio()
 {
     AndroidFilePicker.PickAudio(callback);
 }