Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

TextMesh Pro How to set TexMeshPro margins programmatically

Discussion in 'UGUI & TextMesh Pro' started by tencnivel, Nov 20, 2018.

  1. tencnivel

    tencnivel

    Joined:
    Sep 26, 2017
    Posts:
    24
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,874
    You can use the .margin property on the text object.

    Code (csharp):
    1.  
    2. /// <summary>
    3. /// The margins of the text object.
    4. /// </summary>
    5. public virtual Vector4 margin
    6.  
     
  3. tencnivel

    tencnivel

    Joined:
    Sep 26, 2017
    Posts:
    24
    thanks! it works
     
unityunity