diff --git a/Editor/EcsactSdk.cs b/Editor/EcsactSdk.cs index c8e509b..af836cf 100644 --- a/Editor/EcsactSdk.cs +++ b/Editor/EcsactSdk.cs @@ -7,6 +7,7 @@ using System.Runtime.InteropServices; using System.Diagnostics; using System.Threading.Tasks; +using PlasticGui.WebApi.Requests; namespace Ecsact.Editor { @@ -76,11 +77,13 @@ public static void GetRecipeBundles(RecipeCallback callback) { proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardOutput = true; - proc.OutputDataReceived += new DataReceivedEventHandler((sender, e) => { + proc.OutputDataReceived += ((_, e) => { if(string.IsNullOrEmpty(e.Data)) return; recipe_bundles.Add(e.Data); }); + proc.Exited += ((_, e) => { callback(recipe_bundles); }); + proc.Start(); proc.BeginOutputReadLine(); }