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
Add ability to use custom script templates. #9158
Conversation
Templates will be loaded from .godot/script_templates For now they're disabled for GDNative. Ideas for further improvements: - Add a "Save as Template" option to the script editor, as it can normally only save to res:// - Support more placeholders / custom placeholders
@Hinsbart (looking at the screenshot) Shouldn't template names be capitalized? E.g. "no_comments" -> "No Comments". |
@bojidar-bg ah yeah, sounds good |
This would be nice for C# also! 😄 |
@bojidar-bg Yes! just got it to work! Thanks! 😄 Created a minimalistic template with it, found the %CLASS% tag in the source code. God I love open source 😋 using Godot;
public class %CLASS% : %BASE%
{
%TS%
} |
Also just to point out, under Windows, the path to the custom templates are there:
|
For anyone else coming here from a search engine
|
Templates will be loaded from .godot/script_templates
For now they're disabled for GDNative.
Ideas for further improvements:
Fixes #4132