---
title: HorizontalAlignment
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/textcore/horizontalalignment
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/textcore/horizontalalignment.md
last_updated: 2026-10-07
generated_at: 2026-11-10T21:02:05.853Z
locale: en-us
---

# HorizontalAlignment

> How text is horizontally aligned within its layout area.

## Definition

* **Type:** Enum
* **Namespace:** [UnityEngine.TextCore](/engine/7000.0/script-reference/unityengine/textcore.md)
* **Assembly:** UnityEngine.TextCoreTextEngineModule

```csharp
public enum HorizontalAlignment
```

## Fields

| Value                                                                                              | Description                                                                           |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| [Center](/engine/7000.0/script-reference/unityengine/textcore/horizontalalignment/center.md)       | Text is centered within the layout area.                                              |
| [Flush](/engine/7000.0/script-reference/unityengine/textcore/horizontalalignment/flush.md)         | Spaces are stretched so every line, including the last, fills the layout area.        |
| [Justified](/engine/7000.0/script-reference/unityengine/textcore/horizontalalignment/justified.md) | Spaces are stretched so lines fill the layout area; the last line stays left-aligned. |
| [Left](/engine/7000.0/script-reference/unityengine/textcore/horizontalalignment/left.md)           | Text is aligned to the left of the layout area.                                       |
| [Right](/engine/7000.0/script-reference/unityengine/textcore/horizontalalignment/right.md)         | Text is aligned to the right of the layout area.                                      |
