Search Unity

TMP text fields in world space canvases are grossly out of bounds in 2019.2

Discussion in 'UGUI & TextMesh Pro' started by brinca, Aug 2, 2019.

  1. brinca

    brinca

    Joined:
    Mar 29, 2015
    Posts:
    33
    So when I upgraded my project to Unity 2019.2 yesterday, one of the weird issues that popped up was a problem with the bounds of TMP text fields on world space canvases, that grossly overshoot the size of the canvas, such as:


    To note that the canvas is being scaled down to 0.002321589 (which may be part of the problem):


    ... and the fields are being stretched horizontally to fit the canvas width:


    In prefab mode (when you edit the prefab), the text field is of the correct size.


    Now this started happening when I upgraded to 2019.2.0f1, it was working just fine in 2019.1.8f1, and I'm using the latest HDRP (v6.9.1).

    Any ideas on how to fix this?

    Edit: Fix broken images
     
    Last edited: Aug 2, 2019
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Did the version of the TMP package change or were you using the same 2.0.1 before?

    P.S. The images are not visible.
     
  3. brinca

    brinca

    Joined:
    Mar 29, 2015
    Posts:
    33
    TMP version remains the same (2.0.1), and the images should be fixed by now (damn, you beat me to it ;))
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    There is no Camera assigned to the World Space Canvas. Was one assigned before?
     
  5. brinca

    brinca

    Joined:
    Mar 29, 2015
    Posts:
    33
    The camera is assigned at runtime, but no, there was absolutely no change in any of the prefab elements prior to or following the upgrade.
     
  6. brinca

    brinca

    Joined:
    Mar 29, 2015
    Posts:
    33
    BTW this happens to *all* TMP text fields on world space canvases (I have several scattered throughout the level), not only on this one prefab
     
  7. brinca

    brinca

    Joined:
    Mar 29, 2015
    Posts:
    33
    and this seems to be definitely related to the canvas (or maybe the parent transform's) scale, as this example is even more extreme:

    (Note: the text is fixed size at 9pt, and is supposed to fit the canvas bounds, at the top part of the paper model)