diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-03-28 15:48:38 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-03-28 16:21:00 +0200 |
commit | c9b75431f313fae16e9f4c9e60d7f5eaed0aaec0 (patch) | |
tree | 4f5b49ebd9e81cd5e66a92af0b7b1a53eee49169 /modules/mono/editor/script_templates/SCsub | |
parent | 41d075de5865c8b088c83219431661bc2d1f1802 (diff) |
Refactor GDScript/C# script templates logic to be editor-only
Not a full refactor as it still goes through ScriptLanguage so it's hacky,
but at least it can now compile without this.
Diffstat (limited to 'modules/mono/editor/script_templates/SCsub')
-rw-r--r-- | modules/mono/editor/script_templates/SCsub | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/mono/editor/script_templates/SCsub b/modules/mono/editor/script_templates/SCsub new file mode 100644 index 0000000000..39f6cb5c01 --- /dev/null +++ b/modules/mono/editor/script_templates/SCsub @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +Import("env") + +import editor.template_builders as build_template_cs + +env["BUILDERS"]["MakeCSharpTemplateBuilder"] = Builder( + action=env.Run(build_template_cs.make_templates, "Generating C# templates header."), + suffix=".h", + src_suffix=".cs", +) + +# Template files +templates_sources = Glob("*/*.cs") + +env.Alias("editor_template_cs", [env.MakeCSharpTemplateBuilder("templates.gen.h", templates_sources)]) |