I had created 3 children from a parent node.
While working on other nodes, I had closed parent and all of its children.
When I reopened parent node, I realised that there is no indication in Godot if node has been inherited or if it is inheriting from other node.
In some other IDEs, it shows if a class has been extended or extending other and usually there is a shortcut to go directly to child or parent.
How can I see inheritance information for a node in Godot?
In godot, class inheritance and Node Tree hierarchy are orthogonal. They don’t need to match, by design. All Nodes are descendants of the Node class, which descends from the Object class. All Nodes can have anything that is also a Node descendant as a parent or child. It can be confusing, but there’s two separate systems and using both is what makes godot easy to use.
You can see inheritance info in two ways:
- The docs (left + Ctrl + Click) in the code editor will open class docs. Then look at the top where it tells you.
- The inspector. Select a node in your tree and look at the main category boxes in the Inspector. Like this:
MeshInstance3D (topmost category - greyish box with the icon and name)
Then GeometryInstance3D, going down.
I am mostly talking about custom inheritance and how to figure out the children when parent scene or script is opened.
There is no indication in parent scene tree if it has been inherited.
For small projects, it is fine but I think for larger projects, it is going to be difficult.
Another thing is if more than 1 developers are working on the same project, they need to figure out if the scene they are working has been inherited.
Child scene has different color to show that it has been inherited but no indication in Inspector.
Only thing I can find in child scene is that at top level, there is
Open in editor link to other scene similar to when we instantiate another scene.
So it is bit better if you are in child scene to see that it has a parent but nothing to show that parent has been inherited.
I was following a tutorial and they created Level scene and then created two
New Inherited Scene Level01 and Level02.
When I am in Level, I have no knowledge if scene has been inherited.
I am completely new to Godot so I have started using Mermaid | Diagramming and charting tool to keep track of relations before I understand game building design patterns and it becomes easy for me to figure out.
Thanks for your help
Yes, you are correct. There IS no way to figure out if a Scene is used as a Scene Instance inside another Scene without opening that one. At least not at a glance. You can right-click on the Scene in the files panel and select “View Owners” to see where it has been inherited at. However, having that be part of the GUI all the time would be a big use of resources. I don’t think that’s important enough to make everyone’s experience slower.
The point is you can’t see what Scenes inherit another without opening every scene in the project. That’s just how it works. It’s not something that can be improved, really. It’s kinda like asking for PI to be exactly 3.