Layout Textmeshes vertically with equal spacing.

I have several textmesh objects I’m trying to layout down the screen. I need equal spacing between them. My problem is that the spacing is not equal between textmeshes. The space is narrow after textmesh’s that have a bigger bounding box. I have searched all day trying to figure out what the heck an “extents” is exactly. The manual and the scripting reference tell me what it equals, but what EXACTLY is it?? The difference from center to a corner? A diagram would be brilliant. Anyways… My code is as follows.

public void DisplayDown (List<HackingTarget> targets, Vector3 origin) {
    
    foreach (HackingTarget target in targets) {

        GameObject entry = (GameObject) Instantiate (textMesh, origin, Quaternion.identity);
        // Shift instantiation Vector3 down.  
        Vector3 bottomCorner = tMesh.bounds.center - tMesh.bounds.extents;
	    Vector3 bottom = new Vector3 (0, bottomCorner.y, 0);
	    Vector3 down = bottom - new Vector3(0, 1f, 0);
	    origin += down;
    }
}

Indeed extents can be considered as the difference from the center to the corner, of a bounding box. You could think of extents.x as the distance between the center and the right/left edges of the box, and extents.y as the distance between the center and the top/down edges of the box.

What you want to do is:

origin = origin + Vector3.down * (tMesh.bounds.size.y + separationSize);

This will change the origin so it goes down the size of your textMesh, and then an additional separationSize meters down.

BTW, I would recommend using unity’s Canvas set to World Space instead of Text Meshses.