I’m finding, as I go through my Godot journey, that a good indication that a particular approach to a problem is the one preferred by the designers, is the amount of “infrastructure” that goes into making that approach easy to execute.
Case in point, I ran into an issue in my Godot game yesterday, where a nested scene, one included in another nested scene, was unable to get a unique node near the root of the tree. After a bit of reading I learnt about groups, which look to be a way of collecting nodes, regardless of where they are in the tree, in a group that is easy to reference later.
This indeed solved my problem, but it was’t my first approach. There were ways of traversing the tree to find the node in question that I explored first. And I probably could’ve gotten that to work with a bit less-than-great of code. But given that there are 10 methods that deal with groups on the SceneTree
class, along with UI in the editor to create and manage groups, it’s clear that groups was what the developers intended as the right approach.