Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Textmeshpro not scaling ?

Discussion in 'UGUI & TextMesh Pro' started by CyberInteractiveLLC, Jan 6, 2019.

  1. CyberInteractiveLLC

    CyberInteractiveLLC

    Joined:
    May 23, 2017
    Posts:
    306
    hi, I noticed that the textmeshpro's text size doesn't scale with it's parent object when parent gets smaller even when the text object is set to "stretch" with parent.... is this normal ?
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    That is the correct behavior for a <TextMeshProUGUI> object. The RectTransform of the text object would scale but not the text.

    Enabling Text Auto-sizing will result in the point size of the text being adjusted to fit the new RectTransform size. However, you have to be mindful of the performance impact of using Text auto-sizing.

    Text auto-sizing is best used to find the optimum point size for several text objects to ensure you have a uniform point size between them. Typically, you enable auto sizing on a single text object (normally the largest / longest text object) to find this optimum point size. Once you have this point size, you disable auto-sizing on this object and then manually (via code) set the point size on all the other objects.
     
    CyberInteractiveLLC likes this.
  3. CyberInteractiveLLC

    CyberInteractiveLLC

    Joined:
    May 23, 2017
    Posts:
    306
    got it .. thanks