1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #103373 from YeldhamDev/build_remove_physics

Allow to compile templates without physics servers
This commit is contained in:
Rémi Verschelde
2025-03-28 17:30:03 +01:00
72 changed files with 951 additions and 364 deletions

View File

@@ -69,7 +69,6 @@
#include "scene/theme/theme_db.h"
#include "servers/display_server.h"
#include "servers/navigation_server_3d.h"
#include "servers/physics_server_2d.h"
#include "servers/rendering_server.h"
#include "editor/audio_stream_preview.h"
@@ -167,9 +166,17 @@
#include "modules/modules_enabled.gen.h" // For gdscript, mono.
#ifndef PHYSICS_2D_DISABLED
#include "servers/physics_server_2d.h"
#endif // PHYSICS_2D_DISABLED
#ifndef PHYSICS_3D_DISABLED
#include "servers/physics_server_3d.h"
#endif // PHYSICS_3D_DISABLED
#ifdef ANDROID_ENABLED
#include "editor/gui/touch_actions_panel.h"
#endif
#endif // ANDROID_ENABLED
#include <stdlib.h>
@@ -7055,8 +7062,12 @@ EditorNode::EditorNode() {
}
// No physics by default if in editor.
#ifndef PHYSICS_3D_DISABLED
PhysicsServer3D::get_singleton()->set_active(false);
#endif // PHYSICS_3D_DISABLED
#ifndef PHYSICS_2D_DISABLED
PhysicsServer2D::get_singleton()->set_active(false);
#endif // PHYSICS_2D_DISABLED
// No scripting by default if in editor (except for tool).
ScriptServer::set_scripting_enabled(false);