Godot Project gd scripts visualization of what calls where

Godot Version

4.4

Question

So as we keep on creating our game, the project grows bigger and bigger. Many more classes and gd script files are being created.

For example, some classes call the others such as a function in a gun class could instatiate a bullet object and when the bullet hits something, it could instantiate a special effect object.

Because of this, is there a tool to visualize the gd scripts? I would like to see which classes are related to which classes. The reason being I would like to see how the whole project comes together and also see which classes and files are not being used. This is so I could safely prune them out.

gdscript Help > Programming godot-4 General

1 Like

Hi!

I’ve had the same problem when working on a game prototype like one year ago, and after doing a few research back then, I just decided to go with C# for large projects, as I believe code refactoring in gdscript still lacks tools and is a big weakness of the language.

Sadly, I don’t think there are hidden tools in Godot’s embedded editor. I think you should have a look at external IDEs with extensions for gdscript, such as VSCode (never tried it myself, but that post looks interesting: https://www.reddit.com/r/godot/comments/16ve6y3/how_to_get_vscode_working_nicely_with_godot_and/).

This thread also has some interesting info: https://www.reddit.com/r/godot/comments/1772wq1/how_do_you_deal_with_refactoring_and_finding/

The last solution I can think of is migrating to C# for large projects. I know it would be a radical decision, and you may not be comfortable with the language, but it is undeniable that using IDEs like VS/VSCode/Rider makes C# code refactoring easy (I mean the code structure may not be easy the refactor, but the tools are great).

Hopefully, someone using gdscript more than I do will give you better advices, but I hope that can help, if just a bit.