Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Shop Tutorial - Expand towards X and Y Axis

Discussion in 'Scripting' started by victorML, Jun 17, 2018.

  1. victorML

    victorML

    Joined:
    Jul 5, 2017
    Posts:
    38
    Hi :) My name is Víctor Martínez and following this Unity tutorial:
    Shop UI Tutorial
    I achieved the results I show in the following image but what I really want is to expand automatically the objects towards X axis too in order to fill all the space in the shop.
    I could make a code to allocate manually but the Vertical Layout Group doesnt let me to do it. What I want would be mix between vertical layout group and horizontal layout group.
    How can I achieve this ? Any idea ?
    8c033dab6062b4d813e62e882b398950.png
     
  2. victorML

    victorML

    Joined:
    Jul 5, 2017
    Posts:
    38
    Okey, I'm so sorry.
    Finally I get the results I wanted using a Grid Layout what is literally a mix of vertical and horizontal layout.
    To get the results shown in the following image you should use 'Fixed Column Count' of the Grid layout set to 3.

    9395dacb5420e270c2167614f4c2a5eb.png