Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question Text Mesh Pro with Content Size Fitter and Auto Size

Discussion in 'UGUI & TextMesh Pro' started by SoDynamic_, Mar 30, 2021.

  1. SoDynamic_


    Mar 5, 2014
    I'm trying to set up a Text Mesh Pro text element with content size fitter. This is easy, adding a content size fitter to the text object and setting horizontal fit to preferred size works perfectly. Here's my problem:
    Once my text mesh pro object becomes as wide as it's parent element, I'd like it to stop getting wider and use the auto size function to make the text get smaller to accommodate. I've tried using layout element, but it doesn't seem compatible with content size fitter, as it forces it to always be wider than the text.
    Thank you for any help you can provide.
  2. Hosnkobf


    Aug 23, 2016
    I think combining both is not really possible (maybe with some hacky scripts)...
    why can't you just make the size of the Text as big as the parent and remove the content size fitter? What is the greater goal you want to achieve?