Godot Version
Godot 4.4 stable
Question
Just wondering about documenting my custom classes. I have built a state machine for my game and have added documentation to the classes as per the documentation. However when I go to create the concrete state classes, the descriptions don’t show up in the box when you go to select the class to inherit from.
So, I was just wondering if there was something different that I had to do for my class descriptions to show up in the dialog. It’s not much of an issue if not but would be nice for future reference.
My mistake when implementing this was using a single # instead of double ##.
Just played around with this, and if your class extends a resource, you need to have the ## before the extends line. Or basically, put the ##Description above everything in the class code.
My test code:
##Even more preceding for some reason
extends Resource
##Test preceding
class_name entrance_class
The “even more preceding for some reason” shows up as the description when putting “entrance_class” into the editor, while “test preceding” doesn’t show up at all for me.
2 Likes
Yeah, that works. It’s weird how it works differently for resource classes as opposed to node based classes. Might be worth reporting as a bug, cause I’m fairly sure that’s not the way it’s supposed to work.
Thanks for the help though. I appreciate it. 