Skip to content
A horizontal layout group for Unity UI that supports both left-to-right and right-to-left.
C#
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Editor
Runtime update namespaces Feb 19, 2020
.gitignore
CHANGELOG.md
CHANGELOG.md.meta
Editor.meta
LICENSE.md
LICENSE.md.meta
README.md Update README.md Jan 7, 2020
README.md.meta
Resources.meta
Runtime.meta
package.json package.json fix Jan 7, 2020
package.json.meta

README.md

BidirectionalHorizontalLayoutGroup

A Unity3D horizontal layout group that supports both left-to-right and right-to-left. Useful if you are building a UI for an RTL language such as Arabic, Persian, Hebrew, etc. or if you support multiple languages in your app.

The component works just like the default HorizontalLayoutGroup. The only difference is the addition of the "reverse" field. When "reverse" is checked, the layout is done from right to left.

BidirectionalHorizontalLayoutGroup in action

The implementation is based on Unity's HorizontalLayoutGroup located below. https://bitbucket.org/Unity-Technologies/ui/src/2019.1/UnityEngine.UI/UI/Core/Layout/LayoutGroup.cs

Usage

This is a standard Unity package you can add to your project using Git URLs.

Check out the showcase project to see a sample Unity project that uses this package. https://github.com/hk1ll3r/ShowcaseOfBidirectionalHorizontalLayoutGroup

Notes

The Left and Right padding fields always refer to Left and Right respectively regardless of whether "reverse" is checked. However "children alignment" field gets reversed along with the children's order. Take the following examples.

LTR mode

BidirectionalHorizontalLayoutGroup in normal LTR mode

RTL mode

BidirectionalHorizontalLayoutGroup in reverse mode

You can’t perform that action at this time.