# FormattingInfo

> The class contains the fields and methods which are necessary for formatting.

## Definition

* **Type:** Class
* **Namespace:** [Unity.SmartStrings.Core.Formatting](/engine/6000.7/script-reference/unity/smartstrings/core/formatting.md)
* **Assembly:** UnityEngine.SmartStringsModule
* **Implements:** [IFormattingInfo](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo.md), [ISelectorInfo](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iselectorinfo.md)

```csharp
public class FormattingInfo : IFormattingInfo, ISelectorInfo
```

## Properties

| Property                                                                                                                  | Description                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Alignment](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/alignment.md)               | The alignment of the current [Placeholder](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder.md), or, if that is `null`, the alignment inherited from the nearest parent [IFormattingInfo](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo.md) whose alignment is not zero. |
| [CurrentValue](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/currentvalue.md)         | The current value being formatted.                                                                                                                                                                                                                                                                                                       |
| [Format](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/format.md)                     | The parsed format that specifies how to output the current value.                                                                                                                                                                                                                                                                        |
| [FormatDetails](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/formatdetails.md)       | Extra details shared across the current formatting operation.                                                                                                                                                                                                                                                                            |
| [FormatterOptions](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/formatteroptions.md) | The formatter options of the current [Placeholder](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder.md).                                                                                                                                                                                                      |
| [Parent](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/parent.md)                     | The parent [FormattingInfo](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo.md) that created this instance.                                                                                                                                                                                            |
| [Placeholder](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/placeholder.md)           | The [Placeholder](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/placeholder.md) currently being formatted.                                                                                                                                                                                                             |
| [Result](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/result.md)                     | The result after an [ISource](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/isource.md) has assigned a value.                                                                                                                                                                                                       |
| [Selector](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/selector.md)                 | The [Selector](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/selector.md) currently being evaluated.                                                                                                                                                                                                                   |
| [SelectorIndex](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/selectorindex.md)       | The index of the current [Selector](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/selector.md) in the selector list.                                                                                                                                                                                                   |
| [SelectorOperator](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/selectoroperator.md) | The operator string of the current [Selector](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/selector.md), for example a comma or dot.                                                                                                                                                                                  |
| [SelectorText](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/selectortext.md)         | The raw text of the current [Selector](/engine/6000.7/script-reference/unity/smartstrings/core/parsing/selector.md).                                                                                                                                                                                                                     |

## Methods

| Method                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CreateChild](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/createchild.md)                 | Creates a child [IFormattingInfo](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo.md) from the current [IFormattingInfo](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo.md) instance for a [FormattingInfo.Placeholder](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/placeholder.md).               |
| [FormatAsChild](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/formataschild.md)             | Creates a child [IFormattingInfo](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo.md) from the current [IFormattingInfo](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformattinginfo.md) instance and invokes formatting with [SmartFormatter](/engine/6000.7/script-reference/unity/smartstrings/smartformatter.md) and with the child as parameter. |
| [FormattingException](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/formattingexception.md) | Creates a new [FormattingInfo.FormattingException](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/formattingexception.md).                                                                                                                                                                                                                                                   |
| [Initialize](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/initialize.md)                   | Initializes this formatting info with the details required for formatting.                                                                                                                                                                                                                                                                                                                                      |
| [ReturnToPool](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/returntopool.md)               | Returns this instance and its [FormattingInfo](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo.md) children to the object pool. This method gets called by FormattingInfoPool when it releases an instance.                                                                                                                                                                   |
| [Write](/engine/6000.7/script-reference/unity/smartstrings/core/formatting/formattinginfo/write.md)                             | Writes the ReadOnlySpan\_1 text parameter to the [IOutput](/engine/6000.7/script-reference/unity/smartstrings/core/output/ioutput.md) and takes care of alignment.                                                                                                                                                                                                                                              |
