public static void DemoEditorCoroutines() { // adds a menu item to test the coroutine system. if (!Application.isPlaying) { // lets fire off the demo coroutine with a UI so we can see what its doing. We could also run it without a UI by using EditorCoroutineRunner.StartCoroutine(...) EditorCoroutineRunner.StartCoroutineWithUI(DemoCoroutiune(), "Lotte's Coroutine Demo", true); } }
public static IEnumerator ExecuteDownload(ConvertSetting s) { GSPluginSettings.Sheet sheet = new GSPluginSettings.Sheet(); sheet.sheetId = s.sheetID; sheet.gid = s.gid; GlobalCCSettings gSettings = CCLogic.GetGlobalSettings(); string csvPath = s.GetCsvPath(gSettings); if (string.IsNullOrWhiteSpace(csvPath)) { Debug.LogError("unexpected downloadPath: " + csvPath); downloadSuccess = false; yield break; } string absolutePath = CCLogic.GetFilePathRelativesToAssets(s.GetDirectoryPath(), csvPath); // 先頭の Assets を削除する if (absolutePath.StartsWith("Assets" + Path.DirectorySeparatorChar)) { sheet.targetPath = absolutePath.Substring(6); } else { Debug.LogError("unexpected downloadPath: " + absolutePath); downloadSuccess = false; yield break; } sheet.isCsv = true; sheet.verbose = false; string title = "Google Spreadsheet Loader"; yield return(EditorCoroutineRunner.StartCoroutineWithUI(GSEditorWindow.Download(sheet, s.GetDirectoryPath()), title, true)); // 成功判定を行う. if (GSEditorWindow.previousDownloadSuccess) { downloadSuccess = true; } yield break; }
public static void DownloadOne(GSPluginSettings.Sheet sheet, string settingPath) { string title = "Google Spreadsheet Loader"; EditorCoroutineRunner.StartCoroutineWithUI(Download(sheet, settingPath), title, true); }
private void DownloadAll(List <GSPluginSettings.Sheet> sheets, string settingDir) { string title = "Downloading All"; EditorCoroutineRunner.StartCoroutineWithUI(downloadAll(sheets, settingDir), title, true); }