Skip to content

Instantly share code, notes, and snippets.

@WolfgangSenff
Last active December 9, 2025 13:36
Show Gist options
  • Select an option

  • Save WolfgangSenff/54c873a696eaf465a8cb2cc859cff782 to your computer and use it in GitHub Desktop.

Select an option

Save WolfgangSenff/54c873a696eaf465a8cb2cc859cff782 to your computer and use it in GitHub Desktop.
Any script with class_name template
# 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.
@WolfgangSenff
Copy link
Author

Note in the above that extends _BASE_ will look like an error in the editor, but it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment