Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made edits to match GDScript code order #10180

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions tutorials/scripting/gdscript/gdscript_documentation_comments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ Documenting script members

Members that are applicable for documentation:

- Inner class
- Constant
- Function
- Signal
- Variable
- Enum
- Enum value
- Constant
- Variable
- Function
- Inner class

Documentation of a script member must immediately precede the member or its annotations
if it has any. The description can have more than one line but every line must start with
Expand All @@ -106,6 +106,8 @@ For example::

Alternatively, you can use inline documentation comments::

signal my_signal ## My signal.

enum MyEnum { ## My enum.
VALUE_A = 0, ## Value A.
VALUE_B = 1, ## Value B.
Expand All @@ -115,11 +117,11 @@ Alternatively, you can use inline documentation comments::

var my_var ## My variable.

signal my_signal ## My signal.

func my_func(): ## My func.
pass


class MyClass: ## My class.
pass

Expand All @@ -142,9 +144,6 @@ Complete script example
## @tutorial(Tutorial 2): https://example.com/tutorial_2
## @experimental

## The description of a constant.
const GRAVITY = 9.8

## The description of a signal.
signal my_signal

Expand All @@ -160,6 +159,9 @@ Complete script example
RIGHT = 3,
}

## The description of a constant.
const GRAVITY = 9.8

## The description of the variable v1.
var v1

Expand Down