Class FlexalonGridLayout
Use a grid layout to position children at fixed intervals. Objects are placed in cells in column-row-layer order.
Inheritance
Implements
Inherited Members
Syntax
[AddComponentMenu("Flexalon/Flexalon Grid Layout")]
[HelpURL("https://www.flexalon.com/docs/gridLayout")]
public class FlexalonGridLayout : LayoutBase, LayoutProperties
CellType
The type of cell to use on the column-row axes.
Declaration
public FlexalonGridLayout.CellTypes CellType { get; set; }Property Value
| Type | Description | 
|---|---|
| FlexalonGridLayout.CellTypes | 
ColumnDirection
The direction of the column axis.
Declaration
public Direction ColumnDirection { get; set; }Property Value
| Type | Description | 
|---|---|
| Direction | 
Columns
The number of columns in the grid.
Declaration
public uint Columns { get; set; }Property Value
| Type | Description | 
|---|---|
| uint | 
ColumnSize
The fixed size of the columns.
Declaration
public float ColumnSize { get; set; }Property Value
| Type | Description | 
|---|---|
| float | 
ColumnSizeType
How to determine the size of the columns,
Declaration
public FlexalonGridLayout.CellSizeTypes ColumnSizeType { get; set; }Property Value
| Type | Description | 
|---|---|
| FlexalonGridLayout.CellSizeTypes | 
ColumnSpacing
The spacing between columns.
Declaration
public float ColumnSpacing { get; set; }Property Value
| Type | Description | 
|---|---|
| float | 
DepthAlign
How to align each child in its cell in depth.
Declaration
public Align DepthAlign { get; set; }Property Value
| Type | Description | 
|---|---|
| Align | 
HorizontalAlign
How to align each child in its cell horizontally.
Declaration
public Align HorizontalAlign { get; set; }Property Value
| Type | Description | 
|---|---|
| Align | 
LayerDirection
The direction of the layer axis.
Declaration
public Direction LayerDirection { get; set; }Property Value
| Type | Description | 
|---|---|
| Direction | 
Layers
The number of layers in the grid.
Declaration
public uint Layers { get; set; }Property Value
| Type | Description | 
|---|---|
| uint | 
LayerSizeSize
The fixed size of the layers.
Declaration
public float LayerSizeSize { get; set; }Property Value
| Type | Description | 
|---|---|
| float | 
LayerSizeType
How to determine the size of the layers.
Declaration
public FlexalonGridLayout.CellSizeTypes LayerSizeType { get; set; }Property Value
| Type | Description | 
|---|---|
| FlexalonGridLayout.CellSizeTypes | 
LayerSpacing
The spacing between layers.
Declaration
public float LayerSpacing { get; set; }Property Value
| Type | Description | 
|---|---|
| float | 
RowDirection
The direction of the row axis.
Declaration
public Direction RowDirection { get; set; }Property Value
| Type | Description | 
|---|---|
| Direction | 
Rows
The number of rows in the grid.
Declaration
public uint Rows { get; set; }Property Value
| Type | Description | 
|---|---|
| uint | 
RowSize
The fixed size of the rows.
Declaration
public float RowSize { get; set; }Property Value
| Type | Description | 
|---|---|
| float | 
RowSizeType
How to determine the size of the rows.
Declaration
public FlexalonGridLayout.CellSizeTypes RowSizeType { get; set; }Property Value
| Type | Description | 
|---|---|
| FlexalonGridLayout.CellSizeTypes | 
RowSpacing
The spacing between rows.
Declaration
public float RowSpacing { get; set; }Property Value
| Type | Description | 
|---|---|
| float | 
VerticalAlign
How to align each child in its cell vertically.
Declaration
public Align VerticalAlign { get; set; }Property Value
| Type | Description | 
|---|---|
| Align | 
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
GetChildAt(int, int, int)
Returns the first child in the cell.
Declaration
public Transform GetChildAt(int column, int row, int layer = 0)Parameters
| Type | Name | Description | 
|---|---|---|
| int | column | The column of the cell. | 
| int | row | The row of the cell. | 
| int | layer | The layer of the cell. | 
Returns
| Type | Description | 
|---|---|
| UnityEngine.Transform | The first child in the cell. | 
GetChildrenAt(int, int, int)
Returns all children in the cell.
Declaration
public Transform[] GetChildrenAt(int column, int row, int layer = 0)Parameters
| Type | Name | Description | 
|---|---|---|
| int | column | The column of the cell. | 
| int | row | The row of the cell. | 
| int | layer | The layer of the cell. | 
Returns
| Type | Description | 
|---|---|
| UnityEngine.Transform[] | A list of children in the cell. | 
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 |