@@ -8,8 +8,8 @@ members of a script. There are two differences between a normal comment and a do
8
8
comment. Firstly, a documentation comment should start with double hash symbols
9
9
``## ``. Secondly, it must immediately precede a script member, or for script descriptions,
10
10
be placed at the top of the script. If an exported variable is documented,
11
- its description is used as a tooltip in the editor. This documentation can be
12
- generated as XML files by the editor .
11
+ its description is used as a tooltip in the editor. The editor can also export XML files
12
+ of this documentation, see ` Generating XML files`_ for details on this .
13
13
14
14
Documenting a script
15
15
--------------------
@@ -355,3 +355,22 @@ the ``lang`` attribute. Currently supported options are:
355
355
- ``[codeblock lang=text] `` disables syntax highlighting;
356
356
- ``[codeblock lang=gdscript] `` highlights GDScript syntax;
357
357
- ``[codeblock lang=csharp] `` highlights C# syntax (only in .NET version).
358
+
359
+ Generating XML files
360
+ --------------------
361
+
362
+ The editor can generate XML files from your documentation comments, which can be useful to create
363
+ an online documentation. To generate the XML files, you can execute the following command from your
364
+ project's root folder:
365
+
366
+ ::
367
+
368
+ godot --doctool <destination> --gdscript-docs <path>
369
+
370
+ The XML files will be generated in the ``<destination> `` folder, or ``docs `` if omitted.
371
+ The target ``<path> `` specifies which scripts will be included, and Godot will recursively generate
372
+ XML files for all scripts in this folder and all subfolders.
373
+
374
+ .. warning ::
375
+
376
+ ``<path> `` must start with ``res:// ``, otherwise Godot will not be able to find scripts!
0 commit comments