Search Unity

TextMesh Pro What is the yellow rect on selected TextMeshPro UGUIs?

Discussion in 'UGUI & TextMesh Pro' started by andyz, Apr 23, 2019.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,279
    If I select a Text Mesh Pro UGUI it is outlined yellow in the Scene view. If I change the RectTransform values the yellow box resizes. If I drag out the yellow box's handles in the scene view then the RectTransform's values do not change and it is a bit puzzling what has happened!
    Why is the rect transform size not directly linked to this yellow box - what is it?!
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    The Yellow Rectangle shows the Margin of the text object which are also accessible in the Extra Settings of the text object.

    Just like with a piece of paper, the margin allows the user to define some offset from the text container.
     
  3. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,279
    OK thanks, now I get it!
    I would just adjust the RectTransform myself, not needed a margin yet but maybe has a use.
     
    moritzcerst likes this.