diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 2cc0619e4a3..2cddf11c147 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5563,6 +5563,14 @@ void EditorNode::_resource_loaded(RES p_resource, const String &p_path) { singleton->editor_folding.load_resource_folding(p_resource, p_path); } +void EditorNode::_project_settings_changed() { + SceneTree *tree = get_tree(); + tree->set_debug_collisions_color(GLOBAL_GET("debug/shapes/collision/shape_color")); + tree->set_debug_collision_contact_color(GLOBAL_GET("debug/shapes/collision/contact_color")); + tree->set_debug_navigation_color(GLOBAL_GET("debug/shapes/navigation/geometry_color")); + tree->set_debug_navigation_disabled_color(GLOBAL_GET("debug/shapes/navigation/disabled_geometry_color")); +} + void EditorNode::_feature_profile_changed() { Ref profile = feature_profile_manager->get_current_profile(); TabContainer *import_tabs = cast_to(import_dock->get_parent()); @@ -5694,6 +5702,7 @@ void EditorNode::_bind_methods() { ClassDB::bind_method(D_METHOD("_reload_modified_scenes"), &EditorNode::_reload_modified_scenes); ClassDB::bind_method(D_METHOD("_reload_project_settings"), &EditorNode::_reload_project_settings); ClassDB::bind_method(D_METHOD("_resave_scenes"), &EditorNode::_resave_scenes); + ClassDB::bind_method(D_METHOD("_project_settings_changed"), &EditorNode::_project_settings_changed); ClassDB::bind_method(D_METHOD("_feature_profile_changed"), &EditorNode::_feature_profile_changed); ClassDB::bind_method("_screenshot", &EditorNode::_screenshot); @@ -6276,6 +6285,7 @@ EditorNode::EditorNode() { project_settings = memnew(ProjectSettingsEditor(&editor_data)); gui_base->add_child(project_settings); + ProjectSettings::get_singleton()->connect("project_settings_changed", this, "_project_settings_changed"); run_settings_dialog = memnew(RunSettingsDialog); gui_base->add_child(run_settings_dialog); diff --git a/editor/editor_node.h b/editor/editor_node.h index 18ae75fb63b..2b474b665e4 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -663,6 +663,7 @@ private: void _reload_project_settings(); void _resave_scenes(String p_str); + void _project_settings_changed(); void _feature_profile_changed(); bool _is_class_editor_disabled_by_feature_profile(const StringName &p_class); Ref _load_custom_class_icon(const String &p_path) const;