I’m working on a project in Godot, and I need to transfer data between nodes that are in different scenes (or different trees of nodes). Specifically, I need to pass or share information (such as variables or settings) between nodes that do not belong to the same scene tree.
You can also detatch a node from the scene tree using remove_child() and then reattach it to another scene using add_child(). This is useful for more complex objects like the player object.