docs.unity3d.com
    Show / Hide Table of Contents

    Class TextContainer

    Inheritance
    Object
    UIBehaviour
    TextContainer
    Inherited Members
    UIBehaviour.Start()
    UIBehaviour.OnDestroy()
    UIBehaviour.IsActive()
    UnityEngine.EventSystems.UIBehaviour.OnValidate()
    UnityEngine.EventSystems.UIBehaviour.Reset()
    UIBehaviour.OnBeforeTransformParentChanged()
    UIBehaviour.OnTransformParentChanged()
    UIBehaviour.OnDidApplyAnimationProperties()
    UIBehaviour.OnCanvasGroupChanged()
    UIBehaviour.OnCanvasHierarchyChanged()
    UIBehaviour.IsDestroyed()
    Namespace: TMPro
    Syntax
    [RequireComponent(typeof(RectTransform))]
    [AddComponentMenu("Layout/Text Container")]
    public class TextContainer : UIBehaviour

    Properties

    anchorPosition

    Declaration
    public TextContainerAnchors anchorPosition { get; set; }
    Property Value
    Type Description
    TextContainerAnchors

    corners

    Declaration
    public Vector3[] corners { get; }
    Property Value
    Type Description
    Vector3[]

    hasChanged

    Declaration
    public bool hasChanged { get; set; }
    Property Value
    Type Description
    Boolean

    height

    Declaration
    public float height { get; set; }
    Property Value
    Type Description
    Single

    isAutoFitting

    Declaration
    public bool isAutoFitting { get; set; }
    Property Value
    Type Description
    Boolean

    isDefaultHeight

    Declaration
    public bool isDefaultHeight { get; }
    Property Value
    Type Description
    Boolean

    isDefaultWidth

    Declaration
    public bool isDefaultWidth { get; }
    Property Value
    Type Description
    Boolean

    margins

    Declaration
    public Vector4 margins { get; set; }
    Property Value
    Type Description
    Vector4

    pivot

    Declaration
    public Vector2 pivot { get; set; }
    Property Value
    Type Description
    Vector2

    rect

    Declaration
    public Rect rect { get; set; }
    Property Value
    Type Description
    Rect

    rectTransform

    The RectTransform used by the object

    Declaration
    public RectTransform rectTransform { get; }
    Property Value
    Type Description
    RectTransform

    size

    Declaration
    public Vector2 size { get; set; }
    Property Value
    Type Description
    Vector2

    textMeshPro

    Declaration
    public TextMeshPro textMeshPro { get; }
    Property Value
    Type Description
    TextMeshPro

    width

    Declaration
    public float width { get; set; }
    Property Value
    Type Description
    Single

    worldCorners

    Declaration
    public Vector3[] worldCorners { get; }
    Property Value
    Type Description
    Vector3[]

    Methods

    Awake()

    Declaration
    protected override void Awake()
    Overrides
    UIBehaviour.Awake()

    OnDisable()

    Declaration
    protected override void OnDisable()
    Overrides
    UIBehaviour.OnDisable()

    OnEnable()

    Declaration
    protected override void OnEnable()
    Overrides
    UIBehaviour.OnEnable()

    OnRectTransformDimensionsChange()

    Callback from Unity to handle RectTransform changes.

    Declaration
    protected override void OnRectTransformDimensionsChange()
    Overrides
    UIBehaviour.OnRectTransformDimensionsChange()
    In This Article
    • Properties
      • anchorPosition
      • corners
      • hasChanged
      • height
      • isAutoFitting
      • isDefaultHeight
      • isDefaultWidth
      • margins
      • pivot
      • rect
      • rectTransform
      • size
      • textMeshPro
      • width
      • worldCorners
    • Methods
      • Awake()
      • OnDisable()
      • OnEnable()
      • OnRectTransformDimensionsChange()
    Back to top
    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