Skip to content

Clarify the global registration of named_classes #10679

Merged
skyace65 merged 3 commits into
godotengine:masterfrom
thibault:clarify_global_class_registry
Feb 15, 2025
Merged

Clarify the global registration of named_classes #10679
skyace65 merged 3 commits into
godotengine:masterfrom
thibault:clarify_global_class_registry

Conversation

@thibault

Copy link
Copy Markdown
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
Comment thread tutorials/scripting/gdscript/gdscript_basics.rst Outdated
Commit PR sugestion

Co-authored-by: tetrapod <145553014+tetrapod00@users.noreply.github.com>
@tetrapod00
tetrapod00 requested a review from a team February 13, 2025 08:08
Comment thread tutorials/scripting/gdscript/gdscript_basics.rst Outdated
Comment thread tutorials/scripting/gdscript/gdscript_basics.rst Outdated
@skyace65
skyace65 merged commit 70def63 into godotengine:master Feb 15, 2025
@skyace65

Copy link
Copy Markdown
Member

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