Unity3d the Grid Layout Group component that uses the UI.

Source: Internet
Author: User

1. First create a container to hold the contents of the list item.

The Panel is used here as a container.

Be careful here!

The Grid Layout Group is added to the game object in the container.

Also, only child objects of the container object have an arrangement effect.

That

The nodes are as follows:

Root = Child1 = Child3

Root = Child2

Root is the container

The arrange effect is only valid for Child1 and Child2.

2. In the Hierarchy window, select Panel object, Position select "Center", width setting 500, high setting 400.

3. In the Hierarchy window, select the Panel object to create two sub-objects of the Panel object, which also uses the Panel component, position setting "Center", width and height set to 50, color selection red, adjust the transparency.

and rename "Item".

4. Add the Grid Layout Group component to the Panel object.

The effect after adding:

Unity3d the Grid Layout Group component that uses the UI.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.