Search Unity

Question Tabs inside a ScrollView

Discussion in 'UGUI & TextMesh Pro' started by deLord, Aug 9, 2020.

  1. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    I have a slightly complicated setup with a ScrollView which I cannot solve.

    scrollview prob.png

    I have a tab-bar (TrackType Select, plastic-bag/paket/glas etc icons) which is supposed to scroll along with the rest. Now the problem results because different tabs (e.g. Trash Canvas - Plastic vs Data Canvas - Metal) have different content heights. Metal for example is only 50% of the height compared to what you see on the screenshot so there is no need even in 3:4 to scroll when Metal is selected.
    The question is what must I do so that Plastic stays completely scrollable while Metal will not scroll when its' content is small? The problem seems to be the Content GO which must be bigger than Metal because it can theoretically contain elements such as Trash Canvas - Plastic

    scroll2.png

    Maybe there's an easy solution for this, but I feel this might be a limitation of Unity or needs some quirky script-workaround :)
     
  2. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
  3. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306
    aaaand up
     
  4. deLord

    deLord

    Joined:
    Oct 11, 2014
    Posts:
    306