Search Unity

Resolved Sizing a background image to text is silly-complex?!

Discussion in 'UGUI & TextMesh Pro' started by andyz, Feb 14, 2024.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    So I have a (TMP) text label and it has a content size fitter on it to make it raycast-size appropriate to the content.
    If I want to add a background image that auto fits the text when it changes it is over-complex.

    edit: yes I am doing it wrong - add a content size fitter to parent only and it will size to fit children's preferred size
     
    Last edited: Feb 14, 2024