Skip to content

Commit 6e94674

Browse files
authored
Merge pull request godotengine#7644 from raulsntos/dotnet/script-templates
2 parents 87a7b5e + cbf5556 commit 6e94674

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

tutorials/scripting/creating_script_templates.rst

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ This is an example of utilizing custom templates at editor and project level:
121121
visible throughout the project's filesystem anymore, yet the templates can be
122122
modified by an external text editor anytime.
123123

124+
.. tip::
125+
126+
By default, every C# file inside the project directory is included in the compilation.
127+
Script templates must be manually excluded from the C# project to avoid build errors.
128+
See `Exclude files from the build <https://learn.microsoft.com/en-us/visualstudio/msbuild/how-to-exclude-files-from-the-build>`_ in the Microsoft documentation.
129+
124130
It is possible to create editor-level templates that have the same level as a project-specific
125131
templates, and also that have the same name as a built-in one, all will be shown on the new script
126132
dialog.
@@ -190,20 +196,23 @@ which are currently implemented.
190196
Base placeholders
191197
~~~~~~~~~~~~~~~~~
192198

193-
+-------------+-----------------------------------------------------------------+
194-
| Placeholder | Description |
195-
+=============+=================================================================+
196-
| ``_CLASS_`` | The name of the new class (used in C# only). |
197-
+-------------+-----------------------------------------------------------------+
198-
| ``_BASE_`` | The base type a new script inherits from. |
199-
+-------------+-----------------------------------------------------------------+
200-
| ``_TS_`` | Indentation placeholder. The exact type and number of |
201-
| | whitespace characters used for indentation is determined by |
202-
| | the ``text_editor/indent/type`` and ``text_editor/indent/size`` |
203-
| | settings in the :ref:`EditorSettings <class_EditorSettings>` |
204-
| | respectively. Can be overridden by the ``meta-space-indent`` |
205-
| | header on the template. |
206-
+-------------+-----------------------------------------------------------------+
199+
+--------------------------+----------------------------------------------------+
200+
| Placeholder | Description |
201+
+==========================+====================================================+
202+
| ``_BINDINGS_NAMESPACE_`` | The name of the Godot namespace (used in C# only). |
203+
+--------------------------+----------------------------------------------------+
204+
| ``_CLASS_`` | The name of the new class (used in C# only). |
205+
+--------------------------+----------------------------------------------------+
206+
| ``_BASE_`` | The base type a new script inherits from. |
207+
+--------------------------+----------------------------------------------------+
208+
| ``_TS_`` | Indentation placeholder. The exact type and number |
209+
| | of whitespace characters used for indentation is |
210+
| | determined by the ``text_editor/indent/type`` and |
211+
| | ``text_editor/indent/size`` settings in the |
212+
| | :ref:`EditorSettings <class_EditorSettings>` |
213+
| | respectively. Can be overridden by the |
214+
| | ``meta-space-indent`` header on the template. |
215+
+--------------------------+----------------------------------------------------+
207216

208217
Type placeholders
209218
~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)