diff options
author | Ibrahn Sahir <ibrahn.sahir@gmail.com> | 2021-10-30 15:15:00 +0100 |
---|---|---|
committer | Ibrahn Sahir <ibrahn.sahir@gmail.com> | 2021-10-30 15:15:00 +0100 |
commit | 27a6ab457b15e448147ab97ab6b23e835ac9e741 (patch) | |
tree | 5bb66700e7ce7ccae8affbf6fc3433a38779622e | |
parent | 6b0b1a4c042175190381737e3000027ef912e6cb (diff) |
Turn off physics and 3d navigation servers in the Project Manager.
Copying the editor behaviour of deactivating these servers we're not
using, to reduce CPU load.
-rw-r--r-- | editor/project_manager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index e8fd3070c2..f0abf63257 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -52,6 +52,7 @@ #include "scene/gui/texture_rect.h" #include "scene/main/window.h" #include "servers/display_server.h" +#include "servers/navigation_server_3d.h" static inline String get_project_key_from_path(const String &dir) { return dir.replace("/", "::"); @@ -2387,6 +2388,11 @@ ProjectManager::ProjectManager() { EditorSettings::create(); } + // Turn off some servers we aren't going to be using in the Project Manager. + NavigationServer3D::get_singleton()->set_active(false); + PhysicsServer3D::get_singleton()->set_active(false); + PhysicsServer2D::get_singleton()->set_active(false); + EditorSettings::get_singleton()->set_optimize_save(false); //just write settings as they came { |