From d5895306b946d1fcc0dcf18cf1d90cf3e3f42864 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Tue, 22 Oct 2024 21:09:59 -0500 Subject: [PATCH] Add button in GameCooker window to open output build folder. --- Source/Editor/Windows/GameCookerWindow.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Source/Editor/Windows/GameCookerWindow.cs b/Source/Editor/Windows/GameCookerWindow.cs index 855faed63..cbe211eca 100644 --- a/Source/Editor/Windows/GameCookerWindow.cs +++ b/Source/Editor/Windows/GameCookerWindow.cs @@ -328,6 +328,19 @@ namespace FlaxEditor.Windows group.Object(new ReadOnlyValueContainer(platformObj)); + layout.Space(2); + var openOutputButton = layout.Button("Open output folder").Button; + openOutputButton.TooltipText = "Opens the defined out folder if the path exists."; + openOutputButton.Clicked += () => + { + string output = StringUtils.ConvertRelativePathToAbsolute(Globals.ProjectFolder, StringUtils.NormalizePath(proxy.PerPlatformOptions[_platform].Output)); + if (Directory.Exists(output)) + FlaxEngine.FileSystem.ShowFileExplorer(output); + else + FlaxEditor.Editor.LogWarning($"Can not open path: {output} because it does not exist."); + }; + layout.Space(2); + _buildButton = layout.Button("Build").Button; _buildButton.Clicked += OnBuildClicked; }