Search Unity

Unity UI UI fit size without layout group

Discussion in 'UGUI & TextMesh Pro' started by Nyrh, Mar 12, 2023.

  1. Nyrh

    Nyrh

    Joined:
    Mar 7, 2018
    Posts:
    13
    Hi,

    I'm trying to animate my ui but I'm having an issue at the moment.
    I have a UI I want to show and hide if it has elements in it by sliding it verticaly to hide behind the main element.
    The problem is that the parent doesn't upadte it's height when the children is sliding. I know I can't make it size properly with a vertical layout group but then I wouldn't be able to animate it verticaly.

    Why Unity doesn't have Layout group which isn't vertical/horizontal/grid for complexe UIs. The UI element is a joke too because I tought with the flexible height and a content size fitter it would work but no !

    Any idea how to do that ? Thanks ;)
     

    Attached Files: