From 88b1103b446bbc7da914dca9f9b8bffca7bfa585 Mon Sep 17 00:00:00 2001 From: Robert Yevdokimov Date: Fri, 2 Feb 2024 19:14:48 -0500 Subject: [PATCH] Do not use physics process for 2D editor --- editor/plugins/canvas_item_editor_plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 1f9f23b5d073..1b9f0ebc2887 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -3917,7 +3917,7 @@ void CanvasItemEditor::_notification(int p_what) { EditorRunBar::get_singleton()->connect("stop_pressed", callable_mp(this, &CanvasItemEditor::_update_override_camera_button).bind(false)); } break; - case NOTIFICATION_PHYSICS_PROCESS: { + case NOTIFICATION_PROCESS: { EditorNode::get_singleton()->get_scene_root()->set_snap_controls_to_pixels(GLOBAL_GET("gui/common/snap_controls_to_pixels")); int nb_having_pivot = 0; @@ -5580,13 +5580,13 @@ bool CanvasItemEditorPlugin::handles(Object *p_object) const { void CanvasItemEditorPlugin::make_visible(bool p_visible) { if (p_visible) { canvas_item_editor->show(); - canvas_item_editor->set_physics_process(true); + canvas_item_editor->set_process(true); RenderingServer::get_singleton()->viewport_set_disable_2d(EditorNode::get_singleton()->get_scene_root()->get_viewport_rid(), false); RenderingServer::get_singleton()->viewport_set_environment_mode(EditorNode::get_singleton()->get_scene_root()->get_viewport_rid(), RS::VIEWPORT_ENVIRONMENT_ENABLED); } else { canvas_item_editor->hide(); - canvas_item_editor->set_physics_process(false); + canvas_item_editor->set_process(false); RenderingServer::get_singleton()->viewport_set_disable_2d(EditorNode::get_singleton()->get_scene_root()->get_viewport_rid(), true); RenderingServer::get_singleton()->viewport_set_environment_mode(EditorNode::get_singleton()->get_scene_root()->get_viewport_rid(), RS::VIEWPORT_ENVIRONMENT_DISABLED); }