Skip to content

Commit

Permalink
chore: Accidentally removed exited event on process
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelwan committed Jul 5, 2024
1 parent 4ef50a6 commit 1e7a1d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Editor/EcsactSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.Threading.Tasks;
using PlasticGui.WebApi.Requests;

namespace Ecsact.Editor {

Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 1e7a1d3

Please sign in to comment.