Skip to content

Commit 9aa85ce

Browse files
committed
Update "GDScript documentation comments" page
1 parent 5b557cc commit 9aa85ce

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

tutorials/scripting/gdscript/gdscript_documentation_comments.rst

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,24 @@ For example::
100100
## @deprecated
101101
var my_var
102102

103-
Variables, constants, signals, and enum values support inline documentation comments.
104-
Note that inline comments do not support tags.
103+
Alternatively, you can use inline documentation comments::
105104

106-
::
105+
enum MyEnum { ## My enum.
106+
VALUE_A = 0, ## Value A.
107+
VALUE_B = 1, ## Value B.
108+
}
107109

108-
var my_var ## My variable.
109110
const MY_CONST = 1 ## My constant.
111+
112+
var my_var ## My variable.
113+
110114
signal my_signal ## My signal.
111-
enum Direction {
112-
UP = 0, ## Direction up.
113-
DOWN = 1, ## Direction down.
114-
LEFT = 2, ## Direction left.
115-
RIGHT = 3, ## Direction right.
116-
}
115+
116+
func my_func(): ## My func.
117+
pass
118+
119+
class MyClass: ## My class.
120+
pass
117121

118122
The script documentation will update in the editor help window every time the script is updated.
119123
If any member variable or function name starts with an underscore, it will be treated as private.

0 commit comments

Comments
 (0)