Skip to content

Commit

Permalink
Fix CanvasLayer visibility toggle can only run once per frame
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyqiu committed Dec 4, 2022
1 parent 01574a5 commit a6a8935
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/main/canvas_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void CanvasLayer::set_visible(bool p_visible) {
// For CanvasItems that is explicitly top level or has non-CanvasItem parents.
if (is_inside_tree()) {
const String group = "root_canvas" + itos(canvas.get_id());
get_tree()->call_group_flags(SceneTree::GROUP_CALL_UNIQUE, group, "_toplevel_visibility_changed", p_visible);
get_tree()->call_group(group, "_toplevel_visibility_changed", p_visible);
}
}

Expand Down

0 comments on commit a6a8935

Please sign in to comment.