EasyLayout
EasyLayout provides different layouts that not available with default layout groups.
Options
Main Axis
AxisDetermine how elements will be placed (at horizonal or vertical direction first).
Layout Type
LayoutTypesCompact: Compactly places the elements.Grid: Places elements in the grid. Cell size is not fixed and depend on elements sizes in the same row and column.Flex: Places elements like CSS flexbox layout.Staggered: Places elements one-by-one to the shortest column or row depending on the main axis.Ellipse: Places elements one-by-one on the border of the ellipse or the circle starting fromAngle StartandAngle Stepdistance between items.Hex: Places elements in the hexagonal grid.
Group Position
AnchorsOnly for the
CompactandGridlayouts.Combination of horizonal (
Left,Center,Right) and vertical (Upper,Middle,Lower) positions.Elements combine to the group, this option specifies group position relative to the parent.
Row Align
HorizontalAlignsOnly for the
Compactlayout.Element position in the row (
Left,Center,Right).Inner Align
InnerAlignsOnly for the
Compactlayout.Column position relative to the group (
Top,Middle,Bottom).Compact Constraint
CompactConstraintsOnly for the
Compactlayout.Flexible: Rows and columns count depends on the parent size.Max Column CountMax Row Count
Compact Constraint Count
intOnly for the
Compactlayout.Max count of the rows or columns for the
Compact Constraintoption.Cell Align
AnchorsOnly for the
Gridlayout.Elements position relative to the cell size. Same as
Group Position.Grid Constraint
GridConstraintsOnly for the
Gridlayout.Flexible: Rows and columns count depends on the parent size.Fixed Column CountFixed Row Count
Grid Constraint Count
intOnly for the
Gridlayout.Count of the rows or columns for the
Grid Constraintoption.Flex Setting
EasyLayoutFlexSettingsOnly for the
Flexlayout.Wrap
boolIf disabled elements will all placed onto one line (row or column).
Justify Content
EasyLayoutFlexSettings.ContentAlignment along the main axis. Also distribute extra free space on the main axis.
Start: elements placed at the start of the line.Center: elements placed at the center of the line.End: elements placed at the end of the line.Space Between: first element at the start of the line, last element at the end of the line, other elements placed between them with evenly spacing.Space Around: first and last elements are placed with 1n space from the edges, other elements placed with 2n space between them.Space Evenly: elements are placed so that the spacing between any two element and the space to the edges is equal.
Align Content
EasyLayoutFlexSettings.ContentAlignment of the lines (columns or rows) along the cross axis. Also distribute extra free space on the cross axis.
Start: lines placed to the start of the parent.Center: lines placed to the center of the parent.End: lines placed to the end of the parent.Space Between: first line to the start of the parent, last line to the end of the parent, other lines placed between them with evenly spacing.Space Around: first and last lines are placed with 1n space from the edges, other lines placed with 2n space between them.Space Evenly: line are placed so that the spacing between any two lines and the space to the edges is equal.
Align Items
EasyLayoutFlexSettings.ItemsDefine how elements are placed out along the cross axis on the line (column or row).
StartCenterEnd
Staggered Settings
EasyLayoutStaggeredSettingsOnly for the
Staggeredlayout.Fixed Block Count
boolCount of the rows or columns.
Blocks Count
int
Ellipse Settings
EasyLayoutEllipseSettingsOnly for the
Ellipselayout.Set equal width and height for the circle layout.
RectTransform pivot is used as the center of the ellipse.
Width Auto
boolRectTransform width is used as the width of the ellipse.
Width
floatEllipse width if
Width Autodisabled.Height Auto
boolRectTransform height is used as the height of the ellipse.
Height
floatEllipse height if
Height Autodisabled.Angle Start
floatPosition of the first element in the degrees.
Angle Step Auto
boolAre elements placed with equal angular distance or specified
Angle Step?Angle Step
floatElements placed with specified angular distance between neighbour elements.
Fill
EllipseFillDetermines how to calculate the distance between elements if
Angle Step Autoenabled.Closed: angular distance is 360 degrees divided into the elements count; distance is the same between the first and last elements.Arc: angular distance is arc length divided into the elements count minus one
Arc Length
floatDistance between first and last elements if
Angle Step Autoenabled andFillisArc.Can be more than 360 degrees.
Align
EllipseAlignDetermines how elements are placed on the ellipse border.
Outer: right borders of the elements are placed on the ellipse border.Center: center of the elements are placed on the ellipse border.Inner: left borders of the elements are placed on the ellipse border.
ElementsRotate
boolRotate elements according to position or not.
ElementsRotationStart
floatInitial rotation of the elements.
Hex Settings
EasyLayoutHexSettingsOrientation
OrientationModeFlatTopFlat-top orientation.PointyTopPointy-top orientation.
Coordinates
CoordinatesModeReadRead coordinates from theHexCoordinatescomponent and place components in the grid according to those coordinates.WriteAutomatically places components to the grid and writes calculated coordinates to theHexCoordinatescomponent.
Shoves Odd
boolIf enabled shoves odd rows to the bottom (ifFlatTop) or right (ifPointyTop); otherwise, shoves even rows.Constraint
HexConstraintsFlexibleNo constraints.FixedColumnCountConstraint the number of columns to a specified number.FixedRowCountConstraint the number of rows to a specified number.CellsPerRowConstraint the cells per row to a specified number.CellsPerColumnConstraint the cells per column to a specified number.
ConstraintCount
intNumber for the specified constraint.Decrease ShovedShoved rows or columns will have 1 cell less than the specified constraint (only for theCellsPerRowandCellsPerColumnconstraint).
Spacing
Vector2Empty space between elements.
Can be more than specified value for
Flexlayout.For
Hexlayout it is recommended to have following ratio:FlatTop:Yshould beX/ 2PointyTop:Yshould beX* 2
Symmetric
boolUse symmetric margin.
Margin
Vector2Empty space from parent edges.
Skip Inactive
boolDo not reserve space for disabled elements.
Right To Left
boolThe order of placement of elements.
Top To Bottom
boolThe order of placement of elements.
Reset Rotation
boolReset rotation of the elements to 0.
Movement Animation
boolAnimate elements repositioning.
Movement Animate All
boolAnimate all elements if enabled; otherwise new elements will not be animated.
Movement Curve
AnimationCurveMovement animation curve.
Resize Animation
boolAnimate elements resizing.
Resize Animate All
boolAnimate all elements if enabled; otherwise new elements will not be animated.
Resize Curve
AnimationCurveResize animation curve.
IgnoreLayoutElementSizes
boolILayoutElement options will be ignored. Increases performance without side effects if
Children WidthandChildren Heightare not controlled.Children Width
ChildrenSizeDo nothing: do not resize elements.Set Preferred: set element width toPreferred Width.Set Max From Preferred: set maximum of thePreferred Widthfrom the all elements.Fit Container: change children size in range from minimal to preferred to fit container.Set Preferred and Fit Container: set children size to preferred, then increase size proportionallyFlexible Widthto fit parent width if required.Shrink On Overflow: decrease elements width if summary width more than parent width including margin.
Children Height
ChildrenSizeSimilar to
Children Width
Events
Settings Changed
UnityEventEvent, raised after any setting was changed.