Search Unity

Keep child fixed size depending on parent.

Discussion in 'UGUI & TextMesh Pro' started by jmansa, Nov 21, 2019.

  1. jmansa

    jmansa

    Joined:
    Apr 13, 2012
    Posts:
    75
    Hope someone can help me with this issue.
    I have created a gameboard which contains to areas (grids), the gameboard itself and the inventory area below. (Shown below as red).

    These 2 grids are inside a parent panel. (shown below as blue)

    Now my issue it how do I make the panel and the children inside dynamic so if a panel or screen is either wide or tall. (Shown below as green)


    I really hope someone can either show or guide me in the right direction on this and thanks in advance :)
     
  2. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    2,836
    Try giving the top-level object in your board an Aspect Ratio Fitter component set to "fit inside parent".