private static async UniTask ExecuteOnFinishedAsync(string[] scriptLines, CancellationToken cancellationToken) { var scriptText = string.Join(Environment.NewLine, scriptLines); var script = Script.FromScriptText("On wait finished script", scriptText); var playlist = new ScriptPlaylist(script); await playlist.ExecuteAsync(cancellationToken); }
private async void DoAsync() { if (string.IsNullOrEmpty(CommandText.Value)) { Finish(); return; } var script = Script.FromScriptText("PlayMaker", CommandText.Value); var playlist = new ScriptPlaylist(script); await playlist.ExecuteAsync(); Finish(); }