Where to view GDScript 2 Documentation Comments

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Zodman

Once you have written Documentation Comments for your class, how do you actually view them? I can’t find any details in the linked page for opening the custom documentation I have written for my class.

My class doesn’t show up when searching help and clicking the doc button on the inspector takes you to the GDScript Class documentation.

:bust_in_silhouette: Reply From: Enfyna

When you write class_name on top of your class it should show up on the search help button. After you search for it.
For example :

extends ScrollContainer
class_name Scroller

## description for var tween.
var tween : Tween
## description for var child_positions.
var child_positions : Array
## description for var current_child.
var current_child : int = 0

Yes my class has that. It’s good to know where it’s supposed to show up, thank you.

I did a save and a run and after that it started showing up in help.
I thought maybe it wasn’t showing up because I had just opened Godot, but then I closed and reopened the Godot editor and my class still showed up in help.

It is very strange. There’s a bug here preventing custom documentation comments from showing up in search but I can’t quite pin down the repro steps.

Zodman | 2023-03-26 22:07