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

Clarify the global registration of named_classes #10679

Merged
merged 3 commits into from
Feb 15, 2025

Conversation

thibault
Copy link
Contributor

Hi,

This is my first constribution to the great Godot's documentation, I hope it will be useful.

While reading the doc about gdscript classes, I found the usage of the keyword class_name confusing. Notably, the fact that a named class becomes available globally does not seem intuitive to me, as it's not clearly stated.

Seing that gdscript draws some inspiration from Python, as a newcomer it seems reasonable to think that any class must be imported before being used, and that was my first assumption.

Here is a clarification suggestion for the documentation. Feel free to tell me if you think it is a useful addition.

@tetrapod00 tetrapod00 added enhancement topic:gdscript area:manual Issues and PRs related to the Manual/Tutorials section of the documentation labels Feb 12, 2025
Commit PR sugestion

Co-authored-by: tetrapod <[email protected]>
@tetrapod00 tetrapod00 requested a review from a team February 13, 2025 08:08
@skyace65 skyace65 merged commit 70def63 into godotengine:master Feb 15, 2025
1 check passed
@skyace65
Copy link
Contributor

Thanks! And congrats on your first merged PR!

@thibault thibault deleted the clarify_global_class_registry branch February 17, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement topic:gdscript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants