title: How do I scale individual TextMesh Pro Text Objects in a Vertical Layout Group evenly?
body: <p><strong>Unity Version:</strong> 5.6.5f1 Personal</p>
  
  <p><strong>TextMesh Pro Version:</strong> 1.0.56.0b3</p>
  
  <p>I am attempting to create dynamic TextMesh Pro text blocks that are stored in a Vertical Layout Group UI Element. Each block of text is stored in its own gameobject, and all gameobjects are children of the Vertical Layout Group. All TextMesh Pro objects use the same font and have the "Auto-Sizing" flag enabled, so that they scale within the bounds of the Vertical Layout Group. Ideally, all text blocks should have the same font-size when scaling. See the current Vertical Layout Group Inspector with hierarchy for the Group and Child TextMesh Pro Text Blocks.</p>
  
  <p><a href="https://i.stack.imgur.com/4vMGS.png" rel="nofollow noreferrer">Vertical Layout Group Inspector</a></p>
  
  <p>The problem is that if one block of text consists of two lines, and another block consists of three lines, both blocks will take up roughly half of the Vertical Layout Group. However, the first block's font-size will be around 2/3 of the second block's font-size. In practice, I will also occasionally see the two-line text block span three lines with a much larger font-size. See the image link below for details.</p>
  
  <p><a href="https://i.stack.imgur.com/hbJKo.png" rel="nofollow noreferrer">Output In Practice vs. Desired Outcome</a></p>
  
  <p>The goal here is not to modify the Vertical Layout Group in any way. The contents must fit within the group's fixed-position and fixed-size. The blocks of text must be separate objects for the purposes of defining clickable regions. Each region spans over the entire text block, and will resize as the text changes.</p>
  
  <p><a href="https://i.stack.imgur.com/3dxUg.png" rel="nofollow noreferrer">Clickable Region Overlay Demonstration</a></p>
  
  <p>The code behind the Monobehaviour that manages the Vertical Layout Group maintains an array of strings which contain the aforementioned text of all text blocks. Changes, such as additions, edits, and removals to this array appear as changes to the Vertical Layout Group by extension. I'm pretty certain at this point that I'll need to implement functionality to manipulate the text boxes whenever a change occurs, rather than rely on auto-sizing from TextMesh Pro, but it is at this point, that I'm stuck.</p>
  
  <p>How can I achieve the desired outcome, programmatically or otherwise, of maintaining a font-size that is the same across all text boxes added to the Vertical Layout Group while distributing the space of the group amongst text boxes of varying content such that I utilize as much of the Vertical Layout Group as possible?</p>
  
  <p><strong>EDIT:</strong> Added Vertical Layout Group Inspector and Object Hierarchy as an image to this question.</p>