Merge branch 'reload-project' of https://github.com/Tryibion/FlaxEngine into Tryibion-reload-project

This commit is contained in:
Wojtek Figat
2024-02-19 17:48:56 +01:00

View File

@@ -536,6 +536,7 @@ namespace FlaxEditor.Modules
_menuFileRecompileScripts = cm.AddButton("Recompile scripts", inputOptions.RecompileScripts, ScriptsBuilder.Compile);
cm.AddSeparator();
cm.AddButton("Open project...", OpenProject);
cm.AddButton("Reload project", ReloadProject);
cm.AddSeparator();
cm.AddButton("Exit", "Alt+F4", () => Editor.Windows.MainWindow.Close(ClosingReason.User));
@@ -823,6 +824,13 @@ namespace FlaxEditor.Modules
}
}
private void ReloadProject()
{
// Open project, then close it
Editor.OpenProject(Editor.GameProject.ProjectPath);
Editor.Windows.MainWindow.Close(ClosingReason.User);
}
private void OnMenuFileShowHide(Control control)
{
if (control.Visible == false)