# TemplateFormatter

> Registers reusable templates and applies them by name.

## Definition

* **Type:** Class
* **Namespace:** [Unity.SmartStrings.Extensions](/engine/6000.7/script-reference/unity/smartstrings/extensions.md)
* **Assembly:** UnityEngine.SmartStringsModule
* **Inherits from:** [FormatterBase](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/formatterbase.md)
* **Implements:** [IFormatter](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformatter.md), [IInitializer](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iinitializer.md), [ISerializationCallbackReceiver](/engine/6000.7/script-reference/unityengine/iserializationcallbackreceiver.md)

```csharp
public class TemplateFormatter : FormatterBase, IFormatter, IInitializer, ISerializationCallbackReceiver
```

## Methods

| Method                                                                                                  | Description                       |
| ------------------------------------------------------------------------------------------------------- | --------------------------------- |
| [Clear](/engine/6000.7/script-reference/unity/smartstrings/extensions/templateformatter/clear.md)       | Removes all registered templates. |
| [Register](/engine/6000.7/script-reference/unity/smartstrings/extensions/templateformatter/register.md) | Registers a new template.         |
| [Remove](/engine/6000.7/script-reference/unity/smartstrings/extensions/templateformatter/remove.md)     | Removes a template by name.       |

## Inheritance

**Inherited Members:**

* [FormatterBase.DefaultName()](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/formatterbase/defaultname.md)
