Class FlexalonFlexibleLayout
Use a flexible layout to position children linearly along the x, y, or z axis. The sizes of the children are considered so that they are evenly spaced.
Inheritance
Implements
Inherited Members
Syntax
[AddComponentMenu("Flexalon/Flexalon Flexible Layout")]
[HelpURL("https://www.flexalon.com/docs/flexibleLayout")]
public class FlexalonFlexibleLayout : LayoutBase, Layout
Properties
DepthAlign
Determines how the entire layout aligns to the parent's box in depth.
Declaration
public Align DepthAlign { get; set; }
Property Value
Type | Description |
---|---|
Align |
DepthInnerAlign
The inner align property along the Direction axis will change how wrapped lines align with each other. The inner align property along the other two axes will change how each object lines up with all other objects.
Declaration
public Align DepthInnerAlign { get; set; }
Property Value
Type | Description |
---|---|
Align |
Direction
The direction in which objects are placed, one after the other.
Declaration
public Direction Direction { get; set; }
Property Value
Type | Description |
---|---|
Direction |
Gap
Adds a gap between objects on the Direction axis.
Declaration
public float Gap { get; set; }
Property Value
Type | Description |
---|---|
float |
GapType
Determines how the space between children is distributed.
Declaration
public FlexalonFlexibleLayout.GapOptions GapType { get; set; }
Property Value
Type | Description |
---|---|
FlexalonFlexibleLayout.GapOptions |
HorizontalAlign
Determines how the entire layout horizontally aligns to the parent's box.
Declaration
public Align HorizontalAlign { get; set; }
Property Value
Type | Description |
---|---|
Align |
HorizontalInnerAlign
The inner align property along the Direction axis will change how wrapped lines align with each other. The inner align property along the other two axes will change how each object lines up with all other objects.
Declaration
public Align HorizontalInnerAlign { get; set; }
Property Value
Type | Description |
---|---|
Align |
VerticalAlign
Determines how the entire layout vertically aligns to the parent's box.
Declaration
public Align VerticalAlign { get; set; }
Property Value
Type | Description |
---|---|
Align |
VerticalInnerAlign
The inner align property along the Direction axis will change how wrapped lines align with each other. The inner align property along the other two axes will change how each object lines up with all other objects.
Declaration
public Align VerticalInnerAlign { get; set; }
Property Value
Type | Description |
---|---|
Align |
Wrap
If set, then the flexible layout will attempt to position children in a line along the Direction axis until it runs out of space. Then it will start the next line by following the wrap direction. Wrapping will only occur if the size of the Direction axis is set to any value other than "Layout".
Declaration
public bool Wrap { get; set; }
Property Value
Type | Description |
---|---|
bool |
WrapDirection
The direction to start a new line when wrapping.
Declaration
public Direction WrapDirection { get; set; }
Property Value
Type | Description |
---|---|
Direction |
WrapGap
Adds a gap between objects on the Wrap Direction axis.
Declaration
public float WrapGap { get; set; }
Property Value
Type | Description |
---|---|
float |
WrapGapType
Determines how the space between lines is distributed.
Declaration
public FlexalonFlexibleLayout.GapOptions WrapGapType { get; set; }
Property Value
Type | Description |
---|---|
FlexalonFlexibleLayout.GapOptions |
Methods
Arrange(FlexalonNode, Vector3)
Position the children of node within the available bounds.
Declaration
public override void Arrange(FlexalonNode node, Vector3 layoutSize)
Parameters
Type | Name | Description |
---|---|---|
FlexalonNode | node | |
UnityEngine.Vector3 | layoutSize |
Overrides
Measure(FlexalonNode, Vector3, Vector3, Vector3)
Perform minimal work to determine what the size of node and available size for node's children.
Declaration
public override Bounds Measure(FlexalonNode node, Vector3 size, Vector3 min, Vector3 max)
Parameters
Type | Name | Description |
---|---|---|
FlexalonNode | node | |
UnityEngine.Vector3 | size | |
UnityEngine.Vector3 | min | |
UnityEngine.Vector3 | max |
Returns
Type | Description |
---|---|
UnityEngine.Bounds |