Quick question about comments in gdscript

Godot Version

godot 4.2.2

Question

When writing comments inside the code, what is the difference between the following?

“# Explaining my function” and “## Explaining my second function”

Both seem to make comments, but I can’t figure out when and where I should be using each.

## are doc comments, if you use them above variables you will for example be able to see that comment when hovering over a variable in the inspector

1 Like

so is there a use for the single # ? are these just comments within the code. and the ## is used more for documentation?

Yes, single # comments are for your more internal comments, like, within a function.

1 Like

thank you much!

1 Like

appreciate the response. thank you much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.