TextMeshPro.alignment

AlignmentTypes alignment;

Description

How lines of text are aligned (Left, Right, Center, Justified).

Note: Text alignment will only be affected when word wrapping is enabled.


using UnityEngine;
using System.Collections;
using TMPro;

public class ExampleClass : MonoBehaviour
{
    void Example()
    {
        GetComponent<TextMeshPro>().alignment = AlignmentTypes.Left;
    }
}