Search Unity

Unity UI Problems with ContentSizeFitter

Discussion in 'UGUI & TextMesh Pro' started by Bradley-Labs, Jan 17, 2019.

  1. Bradley-Labs

    Bradley-Labs

    Joined:
    Sep 19, 2018
    Posts:
    33
    I´m confused about the ContentSizeFitter.
    I will create a ToolTip Window with 2 Childs. Both are UI.Text Elements. The first element are a titel and the second the real ToolTip.
    ToolTip_Childs.PNG ToolTip_config.PNG

    I add the ContentSizeFitter to the Parent Element and set the Vertical Fit to 'Preffered Size' but it does´nt work.
    ToolTip.PNG
     
  2. QUANARMY

    QUANARMY

    Joined:
    Sep 16, 2014
    Posts:
    11
    You should add Layout Group component to Parent (like Vertical or Horizontal).
     
  3. Bradley-Labs

    Bradley-Labs

    Joined:
    Sep 19, 2018
    Posts:
    33
    Many Thanks. Now it works correctly.