0 votes

In the debugging monitoring screen, I see that the number of nodes exceeds the expected number, so how can I simply know which nodes are instantiated? thank you

Godot version 3.5
in Engine by (23 points)

1 Answer

+1 vote
Best answer

With your project running from within the Godot editor, you can view the live scene tree - which will show all instantiated nodes. To do that, just select the "Remote" tab in the "Scene" panel.

The scene tree shown there is LIVE, for the running game.

by (19,286 points)
selected by

Thank you for your reply!But ,it's not very convenient. I don't want to check one by one. There are too many. I hope all instances are listed in a list, and it is better to add them in real time along with the process.

I guess I don't understand what you're looking for. The scene tree will show you ALL instances in a tree hierarchy. I'm not sure how that differs much from your proposed "list".

Further, I assume these instances are being created by your code, so I'm not sure why you wonder "which nodes are instantiated" anyway... You could do something at the code level to "track" them if necessary, but again - I guess I don't really understand what you're trying to solve.

Yes, the instances I want to find are created by code, but the problem is that although the scene tree can see all the created instances, but they are mixed with a large number of other nodes, making it difficult to track.
The code tracing you mentioned is a good idea, but I still need to write a lot of code, which is inconvenient,
So what I want to solve is how to display these nodes created by the code separately in other places, so that I can track them clearly,
Because the structure of the scene tree of my game is too deep and complex, it is difficult for me to immediately know what instances are created in the next second.

Maybe add each instanced node to a collection and include other important info (creation time stamp, ...). Then, write a custom function that dumps that collection to the console (or to an on-screen control). That'd seemingly be simple and might help?

It looks simple, thank you

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.