godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.57k stars 2.96k forks source link

Mention Autoloads on the style page #9521

Open ShatteredRealityX opened 6 days ago

ShatteredRealityX commented 6 days ago

Your Godot version: 4.2.2

Issue description: They aren't mentioned so users don't know the style for naming them (I guess they could follow the Autoload page?) Cuz I was looking at the code for an official demo project and the autoload there was in lower case

https://github.com/godotengine/godot-demo-projects/blob/4.2/networking/multiplayer_bomber/project.godot

URL to the documentation page (if already existing): https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html

AThousandShips commented 6 days ago

This page doesn't touch on file names though does it? I don't think this is the right place for that

ShatteredRealityX commented 6 days ago

No, no the file name, the name you give it to be used in the script

Like you can do Global.my_func() instead of global.my_func()

AThousandShips commented 6 days ago

My bad it does mention to use PascalCase for class names, and snake_case for the files

I don't think autoloads belongs explicitly in this guide, they're not a feature of GDScript but the editor itself, so their naming convention should be covered elsewhere IMO

ShatteredRealityX commented 6 days ago

okay maybe it can be mentioned on the singletons page?