Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Shnayzr · Jan 23, 2017 at 01:56 PM · uilayouthorizontalgroup

How can I make Horizontal Layout Group starts from right to left?

I want that first GameObject added to it to start from right the next left to first one and so on.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
15

Answer by selllfocard · Oct 20, 2017 at 06:57 AM

Try to use Grid Layout Group instead of Horizontal Layout Group with the following properties

  • Child Alignment: (Upper/Middle/Lower) Right

  • Constraint: Fix Row Count

  • Constraint Count: 1

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
6

Answer by samra2494 · Mar 13, 2019 at 09:15 AM

I have solved your problem. lets try this Create a panel add component "Horizontal layout group" and set its "spacing" = "20" also add Component "Content Size Filter" set its "horizontal Fit" to "preferred size" Go to RectTransform on this panel and set pivot x=1 and y = 0 as show in the below screen shot

Now you are able to add Elements in this panel right to left.

[1]: /storage/temp/134664-capture.png


capture.png (39.4 kB)
Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jon_Brant · Feb 28, 2020 at 05:47 PM 1
Share

This worked well for me, thank you! Also, make sure you enable/disable the Horizontal Layout group component to force it to refresh positions. It didn't for me automatically, and looked very wrong.

avatar image nuxvomo · Jan 23, 2021 at 06:36 AM 0
Share

Content Size Filter with Horizontal Fit set to Preferred Size is exactly what fixed this for me. Thanks!

avatar image
1

Answer by hk1ll3r · Jan 07, 2020 at 09:26 AM

I extended Unity's HorizontalLayoutGroup to support RTL as well as LRT. This solution Is more flexible and cleaner than using GridLayoutGroup or re-ordering child elements.

The package is free and open source on github:

https://github.com/hk1ll3r/BidirectionalHorizontalLayoutGroup

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image wisarut · Feb 26, 2020 at 02:56 AM 0
Share

I have to login & comeback to give you a reward, Thanks!

avatar image
0

Answer by roddles · Mar 08, 2017 at 06:54 AM

You need to reverse the order of the child game objects within the layout group. If you are programmatically moving them to the group, call newGameObject.transform.SetFirstSibling () after each insertion, so the first object will be the last sibling, and the last object will be the first.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image unity_gVFXtSYFuvAHCw · May 03, 2020 at 01:40 PM 0
Share

I was having trouble with newest children aligning under the already existing ones in a vertical layout. Your comment saved me! Thank you! In Unity 2019 3.0f3 its newGameObjecttransform.SetAsFirstSibling(); Works perfectly!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

103 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can't animate UI element whose values are controlled by a layout group 0 Answers

Trouble creating a horizontal group for Tall and Wide screen orientation! 0 Answers

Cannot set pivot for children of horizontal layout. 0 Answers

Create placeholders in grid layout group? 1 Answer

How to lock element width or height in a vertical or horizontal layout? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges