diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp index 3b8b94d7a477..8ffe764648ba 100644 --- a/editor/plugins/collision_shape_2d_editor_plugin.cpp +++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp @@ -326,6 +326,10 @@ bool CollisionShape2DEditor::forward_canvas_gui_input(const Ref &p_e return false; } + if (!node->is_visible_in_tree()) { + return false; + } + if (shape_type == -1) { return false; } @@ -448,6 +452,10 @@ void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overla return; } + if (!node->is_visible_in_tree()) { + return; + } + _get_current_shape_type(); if (shape_type == -1) {