diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e13a606805a..c0ec77afef1 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -45,8 +45,6 @@ # Editor /editor/ @godotengine/docks -/editor/script/ @godotengine/script-editor -/editor/shader/ @godotengine/script-editor @godotengine/shaders /editor/animation/ @godotengine/animation /editor/audio/ @godotengine/audio /editor/debugger/ @godotengine/debugger @@ -57,10 +55,12 @@ /editor/import/ @godotengine/import /editor/inspector/ @godotengine/docks /editor/scene/2d/ @godotengine/2d-editor -/editor/scene/2d/physics @godotengine/2d-editor @godotengine/physics +/editor/scene/2d/physics/ @godotengine/2d-editor @godotengine/physics /editor/scene/3d/ @godotengine/3d-editor -/editor/scene/3d/physics @godotengine/3d-editor @godotengine/physics +/editor/scene/3d/physics/ @godotengine/3d-editor @godotengine/physics /editor/scene/gui/ @godotengine/gui-nodes +/editor/script/ @godotengine/script-editor +/editor/shader/ @godotengine/script-editor @godotengine/shaders /editor/themes/ @godotengine/usability @godotengine/gui-nodes /editor/translations/ @godotengine/usability @@ -205,9 +205,12 @@ # Scene /scene/2d/ @godotengine/2d-nodes +/scene/2d/navigation/ @godotengine/2d-nodes @godotengine/navigation /scene/2d/physics/ @godotengine/2d-nodes @godotengine/physics /scene/3d/ @godotengine/3d-nodes +/scene/3d/navigation/ @godotengine/3d-nodes @godotengine/navigation /scene/3d/physics/ @godotengine/3d-nodes @godotengine/physics +/scene/3d/xr/ @godotengine/3d-nodes @godotengine/xr /scene/animation/ @godotengine/animation /scene/audio/ @godotengine/audio /scene/debugger/ @godotengine/debugger @@ -227,18 +230,13 @@ # Servers -/servers/**/audio_* @godotengine/audio -/servers/**/camera_* @godotengine/xr -/servers/**/debugger_* @godotengine/debugger -/servers/**/navigation_* @godotengine/navigation -/servers/**/physics_* @godotengine/physics -/servers/**/rendering_* @godotengine/rendering -/servers/**/text_* @godotengine/gui-nodes -/servers/**/xr_* @godotengine/xr /servers/audio/ @godotengine/audio /servers/camera/ @godotengine/xr /servers/debugger/ @godotengine/debugger -/servers/navigation/ @godotengine/navigation +/servers/navigation_2d/ @godotengine/navigation +/servers/navigation_3d/ @godotengine/navigation +/servers/physics_2d/ @godotengine/physics +/servers/physics_3d/ @godotengine/physics /servers/rendering/ @godotengine/rendering /servers/text/ @godotengine/gui-nodes /servers/xr/ @godotengine/xr diff --git a/.github/actions/godot-deps/action.yml b/.github/actions/godot-deps/action.yml index 76001c1ab02..78b39288c8f 100644 --- a/.github/actions/godot-deps/action.yml +++ b/.github/actions/godot-deps/action.yml @@ -10,7 +10,7 @@ inputs: default: x64 scons-version: description: The SCons version to use. - default: 4.9.0 + default: 4.10.0 runs: using: composite diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml index 961cef7164f..c0800fe673b 100644 --- a/.github/workflows/android_builds.yml +++ b/.github/workflows/android_builds.yml @@ -26,14 +26,14 @@ jobs: arch=arm64 production=yes - - name: Template arm32 (target=template_release, arch=arm32) + - name: Template arm32 (target=template_debug, arch=arm32) cache-name: android-template-arm32 - target: template_release + target: template_debug scons-flags: arch=arm32 - - name: Template arm64 (target=template_release, arch=arm64) + - name: Template arm64 (target=template_debug, arch=arm64) cache-name: android-template-arm64 - target: template_release + target: template_debug scons-flags: arch=arm64 steps: @@ -82,7 +82,7 @@ jobs: continue-on-error: true - name: Generate Godot templates - if: matrix.target == 'template_release' + if: matrix.target == 'template_debug' run: | cd platform/android/java ./gradlew generateGodotTemplates diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index ed33b901e5d..f6f9e06916c 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -8,7 +8,7 @@ env: dev_mode=yes module_text_server_fb_enabled=yes "accesskit_sdk_path=${{ github.workspace }}/accesskit-c-0.17.0/" - GODOT_CPP_BRANCH: 4.4 + GODOT_CPP_BRANCH: 4.5 DOTNET_NOLOGO: true DOTNET_CLI_TELEMETRY_OPTOUT: true ASAN_OPTIONS: color=always:print_suppressions=1:suppressions=${{ github.workspace }}/misc/error_suppressions/asan.txt diff --git a/.gitignore b/.gitignore index 99333856f14..c9e8bac07ad 100644 --- a/.gitignore +++ b/.gitignore @@ -217,7 +217,7 @@ xcuserdata/ *.xcscmblueprint *.xccheckout *.xcodeproj/* -!misc/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj +!misc/misc/dist/apple_embedded_xcode/godot.xcodeproj/project.pbxproj # Zed .zed/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7974deff8f9..50dab0db1c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,9 +34,9 @@ repos: stages: [manual] # Not automatically triggered, invoked via `pre-commit run --hook-stage manual clang-tidy` - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.0 + rev: v0.13.1 hooks: - - id: ruff + - id: ruff-check args: [--fix] files: (\.py|SConstruct|SCsub)$ types_or: [text] diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index ed51cf5efbf..e2b5a655e77 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -214,7 +214,7 @@ License: Apache-2.0 Files: thirdparty/basis_universal/* Comment: Basis Universal -Copyright: 2019-2024, Binomial LLC. +Copyright: 2019-2025, Binomial LLC. License: Apache-2.0 Files: thirdparty/brotli/* @@ -555,7 +555,7 @@ License: Zlib Files: thirdparty/sdl/hidapi/* Comment: hidapi Copyright: 2010, Alan Ott, Signal 11 Software -License: BSD-3-Clause +License: BSD-3-clause Files: thirdparty/spirv-cross/* Comment: SPIRV-Cross diff --git a/SConstruct b/SConstruct index 0d4f12e5046..a7b6db535c9 100644 --- a/SConstruct +++ b/SConstruct @@ -210,7 +210,7 @@ opts.Add( ) ) opts.Add(BoolVariable("tests", "Build the unit tests", False)) -opts.Add(BoolVariable("fast_unsafe", "Enable unsafe options for faster rebuilds", False)) +opts.Add(BoolVariable("fast_unsafe", "Enable unsafe options for faster incremental builds", False)) opts.Add(BoolVariable("ninja", "Use the ninja backend for faster rebuilds", False)) opts.Add(BoolVariable("ninja_auto_run", "Run ninja automatically after generating the ninja file", True)) opts.Add("ninja_file", "Path to the generated ninja file", "build.ninja") @@ -239,6 +239,7 @@ opts.Add(BoolVariable("disable_physics_3d", "Disable 3D physics nodes and server opts.Add(BoolVariable("disable_navigation_2d", "Disable 2D navigation features", False)) opts.Add(BoolVariable("disable_navigation_3d", "Disable 3D navigation features", False)) opts.Add(BoolVariable("disable_xr", "Disable XR nodes and server", False)) +opts.Add(BoolVariable("disable_overrides", "Disable project settings overrides and related CLI arguments", False)) opts.Add("build_profile", "Path to a file containing a feature build profile", "") opts.Add("custom_modules", "A list of comma-separated directory paths containing custom modules to build.", "") opts.Add(BoolVariable("custom_modules_recursive", "Detect custom modules recursively for each specified path.", True)) @@ -264,6 +265,14 @@ opts.Add( True, ) ) +opts.Add( + EnumVariable( + "library_type", + "Build library type", + "executable", + ("executable", "static_library", "shared_library"), + ) +) # Thirdparty libraries opts.Add(BoolVariable("builtin_brotli", "Use the built-in Brotli library", True)) @@ -469,16 +478,6 @@ for tool in custom_tools: # Add default include paths. env.Prepend(CPPPATH=["#"]) -# Allow marking includes as external/system to avoid raising warnings. -env["_CCCOMCOM"] += " $_CPPEXTINCFLAGS" -env["CPPEXTPATH"] = [] -if env.scons_version < (4, 2): - env["_CPPEXTINCFLAGS"] = "${_concat(EXTINCPREFIX, CPPEXTPATH, EXTINCSUFFIX, __env__, RDirs, TARGET, SOURCE)}" -else: - env["_CPPEXTINCFLAGS"] = ( - "${_concat(EXTINCPREFIX, CPPEXTPATH, EXTINCSUFFIX, __env__, RDirs, TARGET, SOURCE, affect_signature=False)}" - ) - # configure ENV for platform env.platform_exporters = platform_exporters env.platform_apis = platform_apis @@ -530,10 +529,10 @@ env.Decider("MD5-timestamp") # SCons speed optimization controlled by the `fast_unsafe` option, which provide # more than 10 s speed up for incremental rebuilds. -# Unsafe as they reduce the certainty of rebuilding all changed files, so it's -# enabled by default for `debug` builds, and can be overridden from command line. +# Unsafe as they reduce the certainty of rebuilding all changed files. +# If you use it and run into corrupted incremental builds, try to turn it off. # Ref: https://github.com/SCons/scons/wiki/GoFastButton -if methods.get_cmdline_bool("fast_unsafe", env.dev_build): +if env["fast_unsafe"]: env.SetOption("implicit_cache", 1) env.SetOption("max_drift", 60) @@ -556,6 +555,13 @@ if not env["deprecated"]: if env["precision"] == "double": env.Append(CPPDEFINES=["REAL_T_IS_DOUBLE"]) +# Library Support +if env["library_type"] != "executable": + if "library" not in env.get("supported", []): + print_error(f"Library builds unsupported for {env['platform']}") + Exit(255) + env.Append(CPPDEFINES=["LIBGODOT_ENABLED"]) + # Default num_jobs to local cpu count if not user specified. # SCons has a peculiarity where user-specified options won't be overridden # by SetOption, so we can rely on this to know if we should use our default. @@ -634,6 +640,7 @@ if env["strict_checks"]: # Run SCU file generation script if in a SCU build. if env["scu_build"]: + env.Append(CPPDEFINES=["SCU_BUILD_ENABLED"]) max_includes_per_scu = 8 if env.dev_build: max_includes_per_scu = 1024 @@ -965,19 +972,6 @@ else: # GCC, Clang if env["werror"]: env.AppendUnique(CCFLAGS=["-Werror"]) -# Configure external includes. -if env.msvc: - if not methods.using_clang(env): - if cc_version_major < 16 or (cc_version_major == 16 and cc_version_minor < 10): - env.AppendUnique(CCFLAGS=["/experimental:external"]) - env.AppendUnique(CCFLAGS=["/external:anglebrackets"]) - env.AppendUnique(CCFLAGS=["/external:W0"]) - env["EXTINCPREFIX"] = "/external:I" - env["EXTINCSUFFIX"] = "" -else: - env["EXTINCPREFIX"] = "-isystem " - env["EXTINCSUFFIX"] = "" - if hasattr(detect, "get_program_suffix"): suffix = "." + detect.get_program_suffix() else: @@ -1042,6 +1036,9 @@ if env["minizip"]: if env["brotli"]: env.Append(CPPDEFINES=["BROTLI_ENABLED"]) +if not env["disable_overrides"]: + env.Append(CPPDEFINES=["OVERRIDE_ENABLED"]) + if not env["verbose"]: methods.no_verbose(env) diff --git a/core/SCsub b/core/SCsub index 7482262fffd..60ea202ac96 100644 --- a/core/SCsub +++ b/core/SCsub @@ -51,8 +51,8 @@ if env["brotli"] and env["builtin_brotli"]: ] thirdparty_brotli_sources = [thirdparty_brotli_dir + file for file in thirdparty_brotli_sources] - env_thirdparty.Prepend(CPPEXTPATH=[thirdparty_brotli_dir + "include"]) - env.Prepend(CPPEXTPATH=[thirdparty_brotli_dir + "include"]) + env_thirdparty.Prepend(CPPPATH=[thirdparty_brotli_dir + "include"]) + env.Prepend(CPPPATH=[thirdparty_brotli_dir + "include"]) if env.get("use_ubsan") or env.get("use_asan") or env.get("use_tsan") or env.get("use_lsan") or env.get("use_msan"): env_thirdparty.Append(CPPDEFINES=["BROTLI_BUILD_PORTABLE"]) @@ -69,8 +69,8 @@ if env["builtin_clipper2"]: ] thirdparty_clipper_sources = [thirdparty_clipper_dir + file for file in thirdparty_clipper_sources] - env_thirdparty.Prepend(CPPEXTPATH=[thirdparty_clipper_dir + "include"]) - env.Prepend(CPPEXTPATH=[thirdparty_clipper_dir + "include"]) + env_thirdparty.Prepend(CPPPATH=[thirdparty_clipper_dir + "include"]) + env.Prepend(CPPPATH=[thirdparty_clipper_dir + "include"]) env_thirdparty.Append(CPPDEFINES=["CLIPPER2_ENABLED"]) env.Append(CPPDEFINES=["CLIPPER2_ENABLED"]) @@ -94,9 +94,9 @@ if env["builtin_zlib"]: ] thirdparty_zlib_sources = [thirdparty_zlib_dir + file for file in thirdparty_zlib_sources] - env_thirdparty.Prepend(CPPEXTPATH=[thirdparty_zlib_dir]) + env_thirdparty.Prepend(CPPPATH=[thirdparty_zlib_dir]) # Needs to be available in main env too - env.Prepend(CPPEXTPATH=[thirdparty_zlib_dir]) + env.Prepend(CPPPATH=[thirdparty_zlib_dir]) if env.dev_build: env_thirdparty.Append(CPPDEFINES=["ZLIB_DEBUG"]) # Affects headers so it should also be defined for Godot code @@ -151,9 +151,9 @@ if env["builtin_zstd"]: thirdparty_zstd_sources.append("decompress/huf_decompress_amd64.S") thirdparty_zstd_sources = [thirdparty_zstd_dir + file for file in thirdparty_zstd_sources] - env_thirdparty.Prepend(CPPEXTPATH=[thirdparty_zstd_dir, thirdparty_zstd_dir + "common"]) + env_thirdparty.Prepend(CPPPATH=[thirdparty_zstd_dir, thirdparty_zstd_dir + "common"]) env_thirdparty.Append(CPPDEFINES=["ZSTD_STATIC_LINKING_ONLY"]) - env.Prepend(CPPEXTPATH=thirdparty_zstd_dir) + env.Prepend(CPPPATH=thirdparty_zstd_dir) # Also needed in main env includes will trigger warnings env.Append(CPPDEFINES=["ZSTD_STATIC_LINKING_ONLY"]) diff --git a/core/config/engine.cpp b/core/config/engine.cpp index fa1be2d30d5..154fed8fa17 100644 --- a/core/config/engine.cpp +++ b/core/config/engine.cpp @@ -38,24 +38,40 @@ #include "core/version.h" #include "servers/rendering/rendering_device.h" +void Engine::_update_time_scale() { + _time_scale = _user_time_scale * _game_time_scale; + user_ips = MAX(1, ips * _user_time_scale); + max_user_physics_steps_per_frame = MAX(max_physics_steps_per_frame, max_physics_steps_per_frame * _user_time_scale); +} + void Engine::set_physics_ticks_per_second(int p_ips) { ERR_FAIL_COND_MSG(p_ips <= 0, "Engine iterations per second must be greater than 0."); ips = p_ips; + _update_time_scale(); } int Engine::get_physics_ticks_per_second() const { return ips; } +int Engine::get_user_physics_ticks_per_second() const { + return user_ips; +} + void Engine::set_max_physics_steps_per_frame(int p_max_physics_steps) { ERR_FAIL_COND_MSG(p_max_physics_steps <= 0, "Maximum number of physics steps per frame must be greater than 0."); max_physics_steps_per_frame = p_max_physics_steps; + _update_time_scale(); } int Engine::get_max_physics_steps_per_frame() const { return max_physics_steps_per_frame; } +int Engine::get_user_max_physics_steps_per_frame() const { + return max_user_physics_steps_per_frame; +} + void Engine::set_physics_jitter_fix(double p_threshold) { if (p_threshold < 0) { p_threshold = 0; @@ -112,11 +128,21 @@ uint32_t Engine::get_frame_delay() const { } void Engine::set_time_scale(double p_scale) { - _time_scale = p_scale; + _game_time_scale = p_scale; + _update_time_scale(); } double Engine::get_time_scale() const { - return freeze_time_scale ? 0 : _time_scale; + return freeze_time_scale ? 0.0 : _game_time_scale; +} + +void Engine::set_user_time_scale(double p_scale) { + _user_time_scale = p_scale; + _update_time_scale(); +} + +double Engine::get_effective_time_scale() const { + return freeze_time_scale ? 0.0 : _time_scale; } double Engine::get_unfrozen_time_scale() const { diff --git a/core/config/engine.h b/core/config/engine.h index ab03111f242..9e5e2f728f8 100644 --- a/core/config/engine.h +++ b/core/config/engine.h @@ -30,10 +30,13 @@ #pragma once -#include "core/os/main_loop.h" -#include "core/string/ustring.h" +#include "core/string/string_name.h" +#include "core/templates/hash_map.h" #include "core/templates/list.h" +class Object; +class Dictionary; + template class TypedArray; @@ -59,13 +62,17 @@ private: double _process_step = 0; int ips = 60; + int user_ips = 60; double physics_jitter_fix = 0.5; double _fps = 1; int _max_fps = 0; int _audio_output_latency = 0; double _time_scale = 1.0; + double _game_time_scale = 1.0; + double _user_time_scale = 1.0; uint64_t _physics_frames = 0; int max_physics_steps_per_frame = 8; + int max_user_physics_steps_per_frame = 8; double _physics_interpolation_fraction = 0.0f; bool abort_on_gpu_errors = false; bool use_validation_layers = false; @@ -101,14 +108,19 @@ private: bool freeze_time_scale = false; +protected: + void _update_time_scale(); + public: static Engine *get_singleton(); virtual void set_physics_ticks_per_second(int p_ips); virtual int get_physics_ticks_per_second() const; + virtual int get_user_physics_ticks_per_second() const; virtual void set_max_physics_steps_per_frame(int p_max_physics_steps); virtual int get_max_physics_steps_per_frame() const; + virtual int get_user_max_physics_steps_per_frame() const; void set_physics_jitter_fix(double p_threshold); double get_physics_jitter_fix() const; @@ -132,6 +144,8 @@ public: void set_time_scale(double p_scale); double get_time_scale() const; + void set_user_time_scale(double p_scale); + double get_effective_time_scale() const; double get_unfrozen_time_scale() const; void set_print_to_stdout(bool p_enabled); diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index a9673cf79b3..c5c7a0a6460 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -83,6 +83,11 @@ const PackedStringArray ProjectSettings::get_required_features() { // Returns the features supported by this build of Godot. Includes all required features. const PackedStringArray ProjectSettings::_get_supported_features() { PackedStringArray features = get_required_features(); + +#ifdef LIBGODOT_ENABLED + features.append("LibGodot"); +#endif + #ifdef MODULE_MONO_ENABLED features.append("C#"); #endif @@ -280,7 +285,7 @@ bool ProjectSettings::_set(const StringName &p_name, const Variant &p_value) { if (p_value.get_type() == Variant::NIL) { props.erase(p_name); if (p_name.operator String().begins_with("autoload/")) { - String node_name = p_name.operator String().split("/")[1]; + String node_name = p_name.operator String().get_slicec('/', 1); if (autoloads.has(node_name)) { remove_autoload(node_name); } @@ -326,7 +331,7 @@ bool ProjectSettings::_set(const StringName &p_name, const Variant &p_value) { props[p_name] = VariantContainer(p_value, last_order++); } if (p_name.operator String().begins_with("autoload/")) { - String node_name = p_name.operator String().split("/")[1]; + String node_name = p_name.operator String().get_slicec('/', 1); AutoloadInfo autoload; autoload.name = node_name; String path = p_value; @@ -643,11 +648,16 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b ERR_FAIL_COND_V_MSG(!ok, ERR_CANT_OPEN, vformat("Cannot open resource pack '%s'.", p_main_pack)); Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary"); +#ifdef OVERRIDE_ENABLED if (err == OK && !p_ignore_override) { // Load override from location of the main pack // Optional, we don't mind if it fails - _load_settings_text(p_main_pack.get_base_dir().path_join("override.cfg")); + bool disable_override = GLOBAL_GET("application/config/disable_project_settings_override"); + if (!disable_override) { + _load_settings_text(p_main_pack.get_base_dir().path_join("override.cfg")); + } } +#endif // OVERRIDE_ENABLED return err; } @@ -693,12 +703,17 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b // If we opened our package, try and load our project. if (found) { Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary"); +#ifdef OVERRIDE_ENABLED if (err == OK && !p_ignore_override) { // Load overrides from the PCK and the executable location. // Optional, we don't mind if either fails. - _load_settings_text("res://override.cfg"); - _load_settings_text(exec_path.get_base_dir().path_join("override.cfg")); + bool disable_override = GLOBAL_GET("application/config/disable_project_settings_override"); + if (!disable_override) { + _load_settings_text("res://override.cfg"); + _load_settings_text(exec_path.get_base_dir().path_join("override.cfg")); + } } +#endif // OVERRIDE_ENABLED return err; } } @@ -713,10 +728,15 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b if (!OS::get_singleton()->get_resource_dir().is_empty()) { Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary"); +#ifdef OVERRIDE_ENABLED if (err == OK && !p_ignore_override) { // Optional, we don't mind if it fails. - _load_settings_text("res://override.cfg"); + bool disable_override = GLOBAL_GET("application/config/disable_project_settings_override"); + if (!disable_override) { + _load_settings_text("res://override.cfg"); + } } +#endif // OVERRIDE_ENABLED return err; } @@ -736,11 +756,16 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b err = _load_settings_text_or_binary(resource_path.path_join("project.godot"), resource_path.path_join("project.binary")); if (err == OK && !p_ignore_override) { // Optional, we don't mind if it fails. - _load_settings_text(resource_path.path_join("override.cfg")); +#ifdef OVERRIDE_ENABLED + bool disable_override = GLOBAL_GET("application/config/disable_project_settings_override"); + if (!disable_override) { + _load_settings_text(resource_path.path_join("override.cfg")); + } +#endif // OVERRIDE_ENABLED return err; } } -#endif +#endif // MACOS_ENABLED // Nothing was found, try to find a project file in provided path (`p_path`) // or, if requested (`p_upwards`) in parent directories. @@ -760,7 +785,12 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b err = _load_settings_text_or_binary(current_dir.path_join("project.godot"), current_dir.path_join("project.binary")); if (err == OK && !p_ignore_override) { // Optional, we don't mind if it fails. - _load_settings_text(current_dir.path_join("override.cfg")); +#ifdef OVERRIDE_ENABLED + bool disable_override = GLOBAL_GET("application/config/disable_project_settings_override"); + if (!disable_override) { + _load_settings_text(current_dir.path_join("override.cfg")); + } +#endif // OVERRIDE_ENABLED found = true; break; } @@ -1569,6 +1599,7 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("application/config/use_custom_user_dir", false); GLOBAL_DEF("application/config/custom_user_dir_name", ""); GLOBAL_DEF("application/config/project_settings_override", ""); + GLOBAL_DEF("application/config/disable_project_settings_override", false); GLOBAL_DEF("application/run/main_loop_type", "SceneTree"); GLOBAL_DEF("application/config/auto_accept_quit", true); @@ -1675,6 +1706,7 @@ ProjectSettings::ProjectSettings() { #endif GLOBAL_DEF_BASIC("gui/common/snap_controls_to_pixels", true); + GLOBAL_DEF("gui/common/always_show_focus_state", false); GLOBAL_DEF_BASIC("gui/fonts/dynamic_fonts/use_oversampling", true); GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/rendering_device/vsync/frame_queue_size", PROPERTY_HINT_RANGE, "2,3,1"), 2); @@ -1698,7 +1730,7 @@ ProjectSettings::ProjectSettings() { // installed by the scripts provided in the repository // (check `misc/scripts/install_d3d12_sdk_windows.py`). // For example, if the script installs 1.613.3, the default value must be 613. - GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/rendering_device/d3d12/agility_sdk_version", PROPERTY_HINT_RANGE, "0,10000,1,or_greater,hide_slider"), 613); + GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/rendering_device/d3d12/agility_sdk_version", PROPERTY_HINT_RANGE, "0,10000,1,or_greater,hide_control"), 613); GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Linear Mipmap,Nearest Mipmap"), 1); GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror"), 0); @@ -1732,6 +1764,14 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("navigation/baking/thread_model/baking_use_multiple_threads", true); GLOBAL_DEF("navigation/baking/thread_model/baking_use_high_priority_threads", true); #endif // !defined(NAVIGATION_2D_DISABLED) || !defined(NAVIGATION_3D_DISABLED) +#ifndef NAVIGATION_2D_DISABLED + GLOBAL_DEF("navigation/2d/warnings/navmesh_edge_merge_errors", true); + GLOBAL_DEF("navigation/2d/warnings/navmesh_cell_size_mismatch", true); +#endif // NAVIGATION_2D_DISABLED +#ifndef NAVIGATION_3D_DISABLED + GLOBAL_DEF("navigation/3d/warnings/navmesh_edge_merge_errors", true); + GLOBAL_DEF("navigation/3d/warnings/navmesh_cell_size_mismatch", true); +#endif // NAVIGATION_3D_DISABLED ProjectSettings::get_singleton()->add_hidden_prefix("input/"); } diff --git a/core/config/project_settings.h b/core/config/project_settings.h index cf82d03c610..880a7ed4d1e 100644 --- a/core/config/project_settings.h +++ b/core/config/project_settings.h @@ -30,7 +30,8 @@ #pragma once -#include "core/object/class_db.h" +#include "core/object/object.h" +#include "core/templates/rb_map.h" template class TypedArray; @@ -49,7 +50,7 @@ class ProjectSettings : public Object { public: typedef HashMap CustomMap; static inline const String PROJECT_DATA_DIR_NAME_SUFFIX = "godot"; - static inline const String EDITOR_SETTING_OVERRIDE_PREFIX = "editor_overrides/"; + static inline const String EDITOR_SETTING_OVERRIDE_PREFIX = PNAME("editor_overrides") + String("/"); // Properties that are not for built in values begin from this value, so builtin ones are displayed first. constexpr static const int32_t NO_BUILTIN_ORDER_BASE = 1 << 16; diff --git a/core/core_bind.cpp b/core/core_bind.cpp index f58556468ac..9930ac8aba5 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -35,10 +35,12 @@ #include "core/crypto/crypto_core.h" #include "core/debugger/engine_debugger.h" #include "core/debugger/script_debugger.h" +#include "core/io/file_access.h" #include "core/io/marshalls.h" #include "core/math/geometry_2d.h" #include "core/math/geometry_3d.h" #include "core/os/keyboard.h" +#include "core/os/main_loop.h" #include "core/os/thread_safe.h" #include "core/variant/typed_array.h" @@ -1526,6 +1528,10 @@ void Thread::set_thread_safety_checks_enabled(bool p_enabled) { set_current_thread_safe_for_nodes(!p_enabled); } +bool Thread::is_main_thread() { + return ::Thread::is_main_thread(); +} + void Thread::_bind_methods() { ClassDB::bind_method(D_METHOD("start", "callable", "priority"), &Thread::start, DEFVAL(PRIORITY_NORMAL)); ClassDB::bind_method(D_METHOD("get_id"), &Thread::get_id); @@ -1534,6 +1540,7 @@ void Thread::_bind_methods() { ClassDB::bind_method(D_METHOD("wait_to_finish"), &Thread::wait_to_finish); ClassDB::bind_static_method("Thread", D_METHOD("set_thread_safety_checks_enabled", "enabled"), &Thread::set_thread_safety_checks_enabled); + ClassDB::bind_static_method("Thread", D_METHOD("is_main_thread"), &Thread::is_main_thread); BIND_ENUM_CONSTANT(PRIORITY_LOW); BIND_ENUM_CONSTANT(PRIORITY_NORMAL); @@ -1545,14 +1552,16 @@ namespace Special { ////// ClassDB ////// PackedStringArray ClassDB::get_class_list() const { - List classes; - ::ClassDB::get_class_list(&classes); + LocalVector classes; + ::ClassDB::get_class_list(classes); PackedStringArray ret; ret.resize(classes.size()); + String *ptrw = ret.ptrw(); int idx = 0; - for (const StringName &E : classes) { - ret.set(idx++, E); + for (const StringName &cls : classes) { + ptrw[idx] = cls; + idx++; } return ret; @@ -1806,8 +1815,12 @@ void ClassDB::get_argument_options(const StringName &p_function, int p_idx, List pf == "is_class_enabled" || pf == "is_class_enum_bitfield" || pf == "class_get_api_type"); } if (first_argument_is_class || pf == "is_parent_class") { - for (const String &E : get_class_list()) { - r_options->push_back(E.quote()); + LocalVector classes; + ::ClassDB::get_class_list(classes); + for (const StringName &E : classes) { + if (::ClassDB::is_class_exposed(E)) { + r_options->push_back(E.operator String().quote()); + } } } diff --git a/core/core_bind.h b/core/core_bind.h index ee4054fd7c0..bab29c7c575 100644 --- a/core/core_bind.h +++ b/core/core_bind.h @@ -495,6 +495,7 @@ public: Variant wait_to_finish(); static void set_thread_safety_checks_enabled(bool p_enabled); + static bool is_main_thread(); }; namespace Special { diff --git a/core/core_builders.py b/core/core_builders.py index 7d440556288..88443e03742 100644 --- a/core/core_builders.py +++ b/core/core_builders.py @@ -11,7 +11,7 @@ def disabled_class_builder(target, source, env): with methods.generated_wrapper(str(target[0])) as file: for c in source[0].read(): if cs := c.strip(): - file.write(f"#define ClassDB_Disable_{cs} 1\n") + file.write(f"class {cs}; template <> struct is_class_enabled<{cs}> : std::false_type {{}};\n") # Generate version info diff --git a/core/core_constants.cpp b/core/core_constants.cpp index 89d8a08d5c5..b3251295389 100644 --- a/core/core_constants.cpp +++ b/core/core_constants.cpp @@ -75,7 +75,7 @@ static HashMap> _global_enums; #define BIND_CORE_ENUM_CONSTANT(m_constant) \ { \ - StringName enum_name = __constant_get_enum_name(m_constant, #m_constant); \ + StringName enum_name = __constant_get_enum_name(m_constant); \ _global_constants.push_back(_CoreConstant(enum_name, #m_constant, m_constant)); \ _global_constants_map[#m_constant] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -83,7 +83,7 @@ static HashMap> _global_enums; #define BIND_CORE_BITFIELD_FLAG(m_constant) \ { \ - StringName enum_name = __constant_get_bitfield_name(m_constant, #m_constant); \ + StringName enum_name = __constant_get_bitfield_name(m_constant); \ _global_constants.push_back(_CoreConstant(enum_name, #m_constant, m_constant, false, true)); \ _global_constants_map[#m_constant] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -92,7 +92,7 @@ static HashMap> _global_enums; // This just binds enum classes as if they were regular enum constants. #define BIND_CORE_ENUM_CLASS_CONSTANT(m_enum, m_prefix, m_member) \ { \ - StringName enum_name = __constant_get_enum_name(m_enum::m_member, #m_prefix "_" #m_member); \ + StringName enum_name = __constant_get_enum_name(m_enum::m_member); \ _global_constants.push_back(_CoreConstant(enum_name, #m_prefix "_" #m_member, (int64_t)m_enum::m_member)); \ _global_constants_map[#m_prefix "_" #m_member] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -100,7 +100,7 @@ static HashMap> _global_enums; #define BIND_CORE_BITFIELD_CLASS_FLAG(m_enum, m_prefix, m_member) \ { \ - StringName enum_name = __constant_get_bitfield_name(m_enum::m_member, #m_prefix "_" #m_member); \ + StringName enum_name = __constant_get_bitfield_name(m_enum::m_member); \ _global_constants.push_back(_CoreConstant(enum_name, #m_prefix "_" #m_member, (int64_t)m_enum::m_member, false, true)); \ _global_constants_map[#m_prefix "_" #m_member] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -108,7 +108,7 @@ static HashMap> _global_enums; #define BIND_CORE_ENUM_CLASS_CONSTANT_CUSTOM(m_enum, m_name, m_member) \ { \ - StringName enum_name = __constant_get_enum_name(m_enum::m_member, #m_name); \ + StringName enum_name = __constant_get_enum_name(m_enum::m_member); \ _global_constants.push_back(_CoreConstant(enum_name, #m_name, (int64_t)m_enum::m_member)); \ _global_constants_map[#m_name] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -116,7 +116,7 @@ static HashMap> _global_enums; #define BIND_CORE_BITFIELD_CLASS_FLAG_CUSTOM(m_enum, m_name, m_member) \ { \ - StringName enum_name = __constant_get_bitfield_name(m_enum::m_member, #m_name); \ + StringName enum_name = __constant_get_bitfield_name(m_enum::m_member); \ _global_constants.push_back(_CoreConstant(enum_name, #m_name, (int64_t)m_enum::m_member, false, true)); \ _global_constants_map[#m_name] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -124,7 +124,7 @@ static HashMap> _global_enums; #define BIND_CORE_ENUM_CLASS_CONSTANT_NO_VAL(m_enum, m_prefix, m_member) \ { \ - StringName enum_name = __constant_get_enum_name(m_enum::m_member, #m_prefix "_" #m_member); \ + StringName enum_name = __constant_get_enum_name(m_enum::m_member); \ _global_constants.push_back(_CoreConstant(enum_name, #m_prefix "_" #m_member, (int64_t)m_enum::m_member, true)); \ _global_constants_map[#m_prefix "_" #m_member] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -132,7 +132,7 @@ static HashMap> _global_enums; #define BIND_CORE_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant) \ { \ - StringName enum_name = __constant_get_enum_name(m_constant, #m_constant); \ + StringName enum_name = __constant_get_enum_name(m_constant); \ _global_constants.push_back(_CoreConstant(enum_name, m_custom_name, m_constant)); \ _global_constants_map[m_custom_name] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -144,7 +144,7 @@ static HashMap> _global_enums; #define BIND_CORE_ENUM_CONSTANT_NO_VAL(m_constant) \ { \ - StringName enum_name = __constant_get_enum_name(m_constant, #m_constant); \ + StringName enum_name = __constant_get_enum_name(m_constant); \ _global_constants.push_back(_CoreConstant(enum_name, #m_constant, m_constant, true)); \ _global_constants_map[#m_constant] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -152,7 +152,7 @@ static HashMap> _global_enums; #define BIND_CORE_ENUM_CONSTANT_CUSTOM_NO_VAL(m_custom_name, m_constant) \ { \ - StringName enum_name = __constant_get_enum_name(m_constant, #m_constant); \ + StringName enum_name = __constant_get_enum_name(m_constant); \ _global_constants.push_back(_CoreConstant(enum_name, m_custom_name, m_constant, true)); \ _global_constants_map[m_custom_name] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -166,7 +166,7 @@ static HashMap> _global_enums; #define BIND_CORE_ENUM_CONSTANT(m_constant) \ { \ - StringName enum_name = __constant_get_enum_name(m_constant, #m_constant); \ + StringName enum_name = __constant_get_enum_name(m_constant); \ _global_constants.push_back(_CoreConstant(enum_name, #m_constant, m_constant)); \ _global_constants_map[#m_constant] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -174,7 +174,7 @@ static HashMap> _global_enums; #define BIND_CORE_BITFIELD_FLAG(m_constant) \ { \ - StringName enum_name = __constant_get_bitfield_name(m_constant, #m_constant); \ + StringName enum_name = __constant_get_bitfield_name(m_constant); \ _global_constants.push_back(_CoreConstant(enum_name, #m_constant, m_constant)); \ _global_constants_map[#m_constant] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -183,7 +183,7 @@ static HashMap> _global_enums; // This just binds enum classes as if they were regular enum constants. #define BIND_CORE_ENUM_CLASS_CONSTANT(m_enum, m_prefix, m_member) \ { \ - StringName enum_name = __constant_get_enum_name(m_enum::m_member, #m_prefix "_" #m_member); \ + StringName enum_name = __constant_get_enum_name(m_enum::m_member); \ _global_constants.push_back(_CoreConstant(enum_name, #m_prefix "_" #m_member, (int64_t)m_enum::m_member)); \ _global_constants_map[#m_prefix "_" #m_member] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -191,7 +191,7 @@ static HashMap> _global_enums; #define BIND_CORE_BITFIELD_CLASS_FLAG(m_enum, m_prefix, m_member) \ { \ - StringName enum_name = __constant_get_bitfield_name(m_enum::m_member, #m_prefix "_" #m_member); \ + StringName enum_name = __constant_get_bitfield_name(m_enum::m_member); \ _global_constants.push_back(_CoreConstant(enum_name, #m_prefix "_" #m_member, (int64_t)m_enum::m_member)); \ _global_constants_map[#m_prefix "_" #m_member] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -199,7 +199,7 @@ static HashMap> _global_enums; #define BIND_CORE_ENUM_CLASS_CONSTANT_CUSTOM(m_enum, m_name, m_member) \ { \ - StringName enum_name = __constant_get_enum_name(m_enum::m_member, #m_name); \ + StringName enum_name = __constant_get_enum_name(m_enum::m_member); \ _global_constants.push_back(_CoreConstant(enum_name, #m_name, (int64_t)m_enum::m_member)); \ _global_constants_map[#m_name] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -207,7 +207,7 @@ static HashMap> _global_enums; #define BIND_CORE_BITFIELD_CLASS_FLAG_CUSTOM(m_enum, m_name, m_member) \ { \ - StringName enum_name = __constant_get_bitfield_name(m_enum::m_member, #m_name); \ + StringName enum_name = __constant_get_bitfield_name(m_enum::m_member); \ _global_constants.push_back(_CoreConstant(enum_name, #m_name, (int64_t)m_enum::m_member)); \ _global_constants_map[#m_name] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -215,7 +215,7 @@ static HashMap> _global_enums; #define BIND_CORE_ENUM_CLASS_CONSTANT_NO_VAL(m_enum, m_prefix, m_member) \ { \ - StringName enum_name = __constant_get_enum_name(m_enum::m_member, #m_prefix "_" #m_member); \ + StringName enum_name = __constant_get_enum_name(m_enum::m_member); \ _global_constants.push_back(_CoreConstant(enum_name, #m_prefix "_" #m_member, (int64_t)m_enum::m_member)); \ _global_constants_map[#m_prefix "_" #m_member] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -223,7 +223,7 @@ static HashMap> _global_enums; #define BIND_CORE_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant) \ { \ - StringName enum_name = __constant_get_enum_name(m_constant, #m_constant); \ + StringName enum_name = __constant_get_enum_name(m_constant); \ _global_constants.push_back(_CoreConstant(enum_name, m_custom_name, m_constant)); \ _global_constants_map[m_custom_name] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -235,7 +235,7 @@ static HashMap> _global_enums; #define BIND_CORE_ENUM_CONSTANT_NO_VAL(m_constant) \ { \ - StringName enum_name = __constant_get_enum_name(m_constant, #m_constant); \ + StringName enum_name = __constant_get_enum_name(m_constant); \ _global_constants.push_back(_CoreConstant(enum_name, #m_constant, m_constant)); \ _global_constants_map[#m_constant] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ @@ -243,7 +243,7 @@ static HashMap> _global_enums; #define BIND_CORE_ENUM_CONSTANT_CUSTOM_NO_VAL(m_custom_name, m_constant) \ { \ - StringName enum_name = __constant_get_enum_name(m_constant, #m_constant); \ + StringName enum_name = __constant_get_enum_name(m_constant); \ _global_constants.push_back(_CoreConstant(enum_name, m_custom_name, m_constant)); \ _global_constants_map[m_custom_name] = _global_constants.size() - 1; \ _global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \ diff --git a/core/crypto/SCsub b/core/crypto/SCsub index d33d119fa3e..3cea6bfb471 100644 --- a/core/crypto/SCsub +++ b/core/crypto/SCsub @@ -13,7 +13,7 @@ if is_builtin or not has_module: # Use our headers for builtin or if the module is not going to be compiled. # We decided not to depend on system mbedtls just for these few files that can # be easily extracted. - env_crypto.Prepend(CPPEXTPATH=["#thirdparty/mbedtls/include"]) + env_crypto.Prepend(CPPPATH=["#thirdparty/mbedtls/include"]) # MbedTLS core functions (for CryptoCore). # If the mbedtls module is compiled we don't need to add the .c files with our diff --git a/core/crypto/crypto.h b/core/crypto/crypto.h index 9c752e77ea8..f7fcccfc8e5 100644 --- a/core/crypto/crypto.h +++ b/core/crypto/crypto.h @@ -149,6 +149,8 @@ public: }; class ResourceFormatLoaderCrypto : public ResourceFormatLoader { + GDSOFTCLASS(ResourceFormatLoaderCrypto, ResourceFormatLoader); + public: virtual Ref load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE) override; virtual void get_recognized_extensions(List *p_extensions) const override; @@ -161,6 +163,8 @@ public: }; class ResourceFormatSaverCrypto : public ResourceFormatSaver { + GDSOFTCLASS(ResourceFormatSaverCrypto, ResourceFormatSaver); + public: virtual Error save(const Ref &p_resource, const String &p_path, uint32_t p_flags = 0) override; virtual void get_recognized_extensions(const Ref &p_resource, List *p_extensions) const override; diff --git a/core/debugger/engine_debugger.cpp b/core/debugger/engine_debugger.cpp index 2035ab08afe..ee0a06a0c34 100644 --- a/core/debugger/engine_debugger.cpp +++ b/core/debugger/engine_debugger.cpp @@ -121,7 +121,10 @@ void EngineDebugger::iteration(uint64_t p_frame_ticks, uint64_t p_process_ticks, } void EngineDebugger::initialize(const String &p_uri, bool p_skip_breakpoints, bool p_ignore_error_breaks, const Vector &p_breakpoints, void (*p_allow_focus_steal_fn)()) { - register_uri_handler("tcp://", RemoteDebuggerPeerTCP::create); // TCP is the default protocol. Platforms/modules can add more. + register_uri_handler("tcp://", RemoteDebuggerPeerTCP::create_tcp); // TCP is the default protocol. Platforms/modules can add more. +#ifdef UNIX_ENABLED + register_uri_handler("unix://", RemoteDebuggerPeerTCP::create_unix); +#endif if (p_uri.is_empty()) { return; } @@ -132,10 +135,10 @@ void EngineDebugger::initialize(const String &p_uri, bool p_skip_breakpoints, bo OS::get_singleton()->initialize_debugging(); } else if (p_uri.contains("://")) { const String proto = p_uri.substr(0, p_uri.find("://") + 3); - if (!protocols.has(proto)) { - return; - } - RemoteDebuggerPeer *peer = protocols[proto](p_uri); + CreatePeerFunc *create_fn = protocols.getptr(proto); + ERR_FAIL_NULL_MSG(create_fn, vformat("Invalid protocol: %s.", proto)); + + RemoteDebuggerPeer *peer = (*create_fn)(p_uri); if (!peer) { return; } diff --git a/core/debugger/local_debugger.cpp b/core/debugger/local_debugger.cpp index fb09c39c2d0..c8904e74989 100644 --- a/core/debugger/local_debugger.cpp +++ b/core/debugger/local_debugger.cpp @@ -31,6 +31,7 @@ #include "local_debugger.h" #include "core/debugger/script_debugger.h" +#include "core/os/main_loop.h" #include "core/os/os.h" struct LocalDebugger::ScriptsProfiler { diff --git a/core/debugger/remote_debugger.cpp b/core/debugger/remote_debugger.cpp index 76b19a3903a..40073b21490 100644 --- a/core/debugger/remote_debugger.cpp +++ b/core/debugger/remote_debugger.cpp @@ -40,7 +40,7 @@ #include "core/math/expression.h" #include "core/object/script_language.h" #include "core/os/os.h" -#include "servers/display_server.h" +#include "servers/display/display_server.h" class RemoteDebugger::PerformanceProfiler : public EngineProfiler { Object *performance = nullptr; @@ -48,9 +48,9 @@ class RemoteDebugger::PerformanceProfiler : public EngineProfiler { uint64_t last_monitor_modification_time = 0; public: - void toggle(bool p_enable, const Array &p_opts) {} - void add(const Array &p_data) {} - void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) { + void toggle(bool p_enable, const Array &p_opts) override {} + void add(const Array &p_data) override {} + void tick(double p_frame_time, double p_process_time, double p_physics_time, double p_physics_frame_time) override { if (!performance) { return; } @@ -566,25 +566,25 @@ void RemoteDebugger::debug(bool p_can_continue, bool p_is_error_breakpoint) { input_vals.append(V); } - List native_types; - ClassDB::get_class_list(&native_types); - for (const StringName &E : native_types) { - if (!ClassDB::is_class_exposed(E) || !Engine::get_singleton()->has_singleton(E) || Engine::get_singleton()->is_singleton_editor_only(E)) { + LocalVector native_types; + ClassDB::get_class_list(native_types); + for (const StringName &class_name : native_types) { + if (!ClassDB::is_class_exposed(class_name) || !Engine::get_singleton()->has_singleton(class_name) || Engine::get_singleton()->is_singleton_editor_only(class_name)) { continue; } - input_names.append(E); - input_vals.append(Engine::get_singleton()->get_singleton_object(E)); + input_names.append(class_name); + input_vals.append(Engine::get_singleton()->get_singleton_object(class_name)); } - List user_types; - ScriptServer::get_global_class_list(&user_types); - for (const StringName &S : user_types) { - String scr_path = ScriptServer::get_global_class_path(S); + LocalVector user_types; + ScriptServer::get_global_class_list(user_types); + for (const StringName &class_name : user_types) { + String scr_path = ScriptServer::get_global_class_path(class_name); Ref