From d9964f7b1832d678c01ae913ee40d46e418e05c8 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 16 Oct 2024 17:47:03 +0200 Subject: [PATCH] Mention documentation comments in GDScript basics --- tutorials/scripting/gdscript/gdscript_basics.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tutorials/scripting/gdscript/gdscript_basics.rst b/tutorials/scripting/gdscript/gdscript_basics.rst index 4c28b531c..8c6947de2 100644 --- a/tutorials/scripting/gdscript/gdscript_basics.rst +++ b/tutorials/scripting/gdscript/gdscript_basics.rst @@ -565,6 +565,21 @@ considered a comment. The list of highlighted keywords and their colors can be changed in the **Text Editor > Theme > Comment Markers** section of the Editor Settings. +Use two hash symbols (``##``) instead of one (``#``) to add a *documentation +comment*, which will appear in the script documentation and in the inspector +description of an exported variable. Documentation comments must be placed +directly *above* a documentable item (such as a member variable), or at the top +of a file. Dedicated formatting options are also available. See +:ref:`doc_gdscript_documentation_comments` for details. + + +:: + ## This comment will appear in the script documentation. + var value + + ## This comment will appear in the inspector tooltip, and in the documentation. + @export var exported_value + Code regions ------------