1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-02 16:48:55 +00:00

Optimize scene tree groups

This commit is contained in:
dementive
2025-07-10 22:09:56 -05:00
parent c6d130abd9
commit 56fa8caef4
8 changed files with 35 additions and 43 deletions

View File

@@ -117,8 +117,7 @@ PackedStringArray CanvasModulate::get_configuration_warnings() const {
PackedStringArray warnings = Node2D::get_configuration_warnings();
if (is_in_canvas && is_visible_in_tree()) {
List<Node *> nodes;
get_tree()->get_nodes_in_group("_canvas_modulate_" + itos(get_canvas().get_id()), &nodes);
Vector<Node *> nodes = get_tree()->get_nodes_in_group("_canvas_modulate_" + itos(get_canvas().get_id()));
if (nodes.size() > 1) {
warnings.push_back(RTR("Only one visible CanvasModulate is allowed per canvas.\nWhen there are more than one, only one of them will be active. Which one is undefined."));