docs.unity3d.com
    Show / Hide Table of Contents

    Text Alignment

    Each text object has an overall alignment, but you can override this with <align> tags. All horizontal alignment options are available except for Geometry Center.

    Normally you put these tags at the start of a paragraph. Successive alignment scopes don't stack. If you put multiple alignment tags on the same line, the last one overrides the others.

    The closing </align> tag reverts back to the object's overall alignment.

    Example:

    <align="left"><b>Left-aligned</b>
    
    <align="center"><b>Center-aligned</b>
    
    <align="right"><b>Right-aligned</b>
    
    <align="justified"><b>Justified:</b> stretched to fill the display area (except for the last line)
    
    <align="flush"><b>Flush:</b> stretched to fill the display area (including the last line)
    


    Text Alignment

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023