All of the use cases I found myself wanting to inspect the scene graph are at initialization stage. Performance at that moment is not important in most cases. While having that info about the scene allows me to reuse lot of code and create better design.
Even allows a level designer communicate something to the code without having to write a single line of Lua code. (or attaching more unnecessary scripts).
I’m back to this thread because just today I found myself again fighting with the fact that there is no way way to communicate anything from the Collection scene to the Script. The script has to know anything in advance.
Today case: I have several GUIs that are very similar, so all of them can be managed by a single gui_script, the only thing the scripts needs to know is who is the root node (or multiple root nodes).
Look what I had to do, before almost giving up
^ I created a Text node that will always named roots then I can parse the text property at initialization to know who are the root node names of the scene. “Solved.”
Scene graph inspection could help us a lot with things like these.
I was also thinking about a “Table component”, an invisible component that just store key=values, I will elaborate better and post in another thread to see if more people are interested on this too.
Merry Christmas and Happy New Year!