Browse Source

Fix CanvasLayer visibility toggle can only run once per frame

(cherry picked from commit a6a89356b782ddf0e34c86f764cfc4539fb67247)
Haoyu Qiu 2 years ago
parent
commit
3d0f484c57
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/main/canvas_layer.cpp

+ 1 - 1
scene/main/canvas_layer.cpp

@@ -54,7 +54,7 @@ void CanvasLayer::set_visible(bool p_visible) {
 	// For CanvasItems that is explicitly top level or has non-CanvasItem parents.
 	// For CanvasItems that is explicitly top level or has non-CanvasItem parents.
 	if (is_inside_tree()) {
 	if (is_inside_tree()) {
 		const String group = "root_canvas" + itos(canvas.get_id());
 		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);
 	}
 	}
 }
 }