1
0
Fork 0

Setup working directory when quitting to project manager

This commit is contained in:
kobewi 2025-02-02 00:25:34 +01:00
parent 1586c5674b
commit 3b3b6661ad
1 changed files with 7 additions and 0 deletions

View File

@ -2074,6 +2074,13 @@ void EditorNode::restart_editor(bool p_goto_project_manager) {
if (p_goto_project_manager) {
args.push_back("--project-manager");
// Setup working directory.
const String exec_dir = OS::get_singleton()->get_executable_path().get_base_dir();
if (!exec_dir.is_empty()) {
args.push_back("--path");
args.push_back(exec_dir);
}
} else {
args.push_back("--path");
args.push_back(ProjectSettings::get_singleton()->get_resource_path());