From cbf555608cc503d2257845829f16c927b663faa3 Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Tue, 11 Jul 2023 20:53:48 +0200 Subject: [PATCH] C#: Add tip about excluding template files from build - Add tip about excluding C# template files from build. - Add `_BINDINGS_NAMESPACE_` placeholder to the list of placeholders. --- .../scripting/creating_script_templates.rst | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/tutorials/scripting/creating_script_templates.rst b/tutorials/scripting/creating_script_templates.rst index 1046ce80920..083ce282795 100644 --- a/tutorials/scripting/creating_script_templates.rst +++ b/tutorials/scripting/creating_script_templates.rst @@ -121,6 +121,12 @@ This is an example of utilizing custom templates at editor and project level: visible throughout the project's filesystem anymore, yet the templates can be modified by an external text editor anytime. +.. tip:: + + By default, every C# file inside the project directory is included in the compilation. + Script templates must be manually excluded from the C# project to avoid build errors. + See `Exclude files from the build `_ in the Microsoft documentation. + It is possible to create editor-level templates that have the same level as a project-specific templates, and also that have the same name as a built-in one, all will be shown on the new script dialog. @@ -190,20 +196,23 @@ which are currently implemented. Base placeholders ~~~~~~~~~~~~~~~~~ -+-------------+-----------------------------------------------------------------+ -| Placeholder | Description | -+=============+=================================================================+ -| ``_CLASS_`` | The name of the new class (used in C# only). | -+-------------+-----------------------------------------------------------------+ -| ``_BASE_`` | The base type a new script inherits from. | -+-------------+-----------------------------------------------------------------+ -| ``_TS_`` | Indentation placeholder. The exact type and number of | -| | whitespace characters used for indentation is determined by | -| | the ``text_editor/indent/type`` and ``text_editor/indent/size`` | -| | settings in the :ref:`EditorSettings ` | -| | respectively. Can be overridden by the ``meta-space-indent`` | -| | header on the template. | -+-------------+-----------------------------------------------------------------+ ++--------------------------+----------------------------------------------------+ +| Placeholder | Description | ++==========================+====================================================+ +| ``_BINDINGS_NAMESPACE_`` | The name of the Godot namespace (used in C# only). | ++--------------------------+----------------------------------------------------+ +| ``_CLASS_`` | The name of the new class (used in C# only). | ++--------------------------+----------------------------------------------------+ +| ``_BASE_`` | The base type a new script inherits from. | ++--------------------------+----------------------------------------------------+ +| ``_TS_`` | Indentation placeholder. The exact type and number | +| | of whitespace characters used for indentation is | +| | determined by the ``text_editor/indent/type`` and | +| | ``text_editor/indent/size`` settings in the | +| | :ref:`EditorSettings ` | +| | respectively. Can be overridden by the | +| | ``meta-space-indent`` header on the template. | ++--------------------------+----------------------------------------------------+ Type placeholders ~~~~~~~~~~~~~~~~~