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

Allow to compile templates without physics servers

This commit is contained in:
Michael Alexsander
2025-02-27 19:01:23 -03:00
parent b13c96b097
commit 5ad414d046
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);