Last active
December 9, 2025 13:36
-
-
Save WolfgangSenff/54c873a696eaf465a8cb2cc859cff782 to your computer and use it in GitHub Desktop.
Any script with class_name template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # meta-name: ClassNamed | |
| # meta-description: Auto-class_name anything | |
| class_name _CLASS_ | |
| extends _BASE_ | |
| # To use: in a Godot project, add a script_templates folder, add a sub-folder of it named Object, and copy/paste the above into a file named class_named.gd. | |
| # Then, when creating a new resource, have it inherit Resource in the editor for the new script creation, and tap on the checkbox next to template, and select the new ClassNamed template. When you give it a name for the .gd file, it'll put the name instead of _CLASS_. This works for any type you want to add. |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note in the above that
extends _BASE_will look like an error in the editor, but it works.