Two root/game instances...?

Godot Version

4.4

Question

Hi! I’m completely confused on something really weird that’s happening to my scene tab when I run the game. This is an old project that I’ve come back on, so I’m not entirely sure if this was a mistake of some kind that I made in the past, but it’s breaking everything I’m currently making:


When I start the game in debug node, the main node, which I’ve called “Game”, has a script, which in turn has a print function, which should print a path that technically exists during the physics_process, yet it prints that the path both exists and is Object#null.
I’ve tried troubleshooting the problem, but it’s not a script issue. Apparently, in the Scene tab where all the tree nodes are, when I click on Remote while the game is open, there’s two nodes: One actually called “Game”, and another one, called Control@5 for some reason, which is a scene, and I think also happens to be my actual game. Both of these are connected to the game.gd script file, but only one of them actually has access to all the nodes it should, hence why the print() function is both telling me nodes are both #null and existing.
What the hell is happening? How do I delete the local Game node from Remote? How do I even access that? I’m so unbelievably confused.

After losing my mind and a couple hours, I fixed it myself. Since I had made the game.gd script global by putting it on autoload and also a node inside the main scene of the game, it would be loaded twice at the start, causing an issue in the script where it would both have and not have its children nodes…

Called it (happened to me too at one point, didn’t notice until I dropped the floor out and two player characters fell through)

1 Like

I’m glad this is not an isolated case of me just being stupid lol