Replies: 1 comment
-
The script's or outer class's doc comment is below the header for historical reasons. Also, there's a small conceptual problem with the fact that Yes, we should mention that both options are supported, and the user can choose either. But I'm not sure if we should change the examples and the officially recommended order of script elements. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is in regards to "documentation comments", which are located here: https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_documentation_comments.html I have some suggestions for improving that page, which I think are timely given the improvements in 4.4 related to inline documentation.
extends
keyword, which is inconsistent with documentation of "script member documentation" (which are always placed above the definition of the member). The "above" placement is both less ambiguous, and more consistent with other language placements for similar-use comments (including C#), and so I think it should be preferred. It's worth noting that both placements (above and below) do already work.I would recommend changing the paragraph immediately below the "Documenting a script" header to add a sentence about this:
I propose that we change the example to above the definition, and add the
class_name
as well. Here is one possibility:Along the same lines as the 2nd recommendation, I would also propose to change the "Complete script example" further down the page in a manor similar to the above recommendations.
Finally, my last recommendation is a bit more nebulous, and I welcome discussion, but I think it would be nice to include some examples of how these comments appear in the Godot text editor. Where these should appear, and how many, is up for debate.
Beta Was this translation helpful? Give feedback.
All reactions