Class FlexalonTableLayout
- Namespace
- Flexalon
- Assembly
- Flexalon.dll
Use a table layout to position children in rows, columns, and layers. Rows, columns, and layers can have different sizing behavior.
[AddComponentMenu("Flexalon/Flexalon Table Layout")]
[HelpURL("https://www.flexalon.com/docs/tableLayout")]
public class FlexalonTableLayout : FlexalonCellLayout, IFlexalonLayout, IFlexalonSlottedLayout
- Inheritance
-
objectObjectComponentBehaviourMonoBehaviourFlexalonTableLayout
- Implements
- Inherited Members
Properties
Columns
Column count, defaults, and per-column overrides.
public FlexalonTableLayout.TrackCollection Columns { get; }
Property Value
Layers
Layer count, defaults, and per-layer overrides.
public FlexalonTableLayout.TrackCollection Layers { get; }
Property Value
MinCellCount
protected override Vector3Int MinCellCount { get; }
Property Value
- Vector3Int
Rows
Row count, defaults, and per-row overrides.
public FlexalonTableLayout.TrackCollection Rows { get; }
Property Value
Methods
Arrange(IFlexalonNode, Vector3)
Position the children of node within the available bounds.
public override void Arrange(IFlexalonNode node, Vector3 layoutSize)
Parameters
nodeIFlexalonNodelayoutSizeVector3
DoOnEnable()
Called when the component is enabled.
protected override void DoOnEnable()
GetCellBounds(Vector3Int, Vector3Int, bool)
protected override Bounds GetCellBounds(Vector3Int cell, Vector3Int span, bool gridEdges = false)
Parameters
cellVector3IntspanVector3IntgridEdgesbool
Returns
- Bounds
GetLayoutOffset()
protected override Vector3 GetLayoutOffset()
Returns
- Vector3
Initialize()
Called when the component is first created.
protected override void Initialize()
Measure(IFlexalonNode, Vector3, Vector3, Vector3)
Perform minimal work to determine what the size of node and available size for node's children.
public override Bounds Measure(IFlexalonNode node, Vector3 size, Vector3 min, Vector3 max)
Parameters
nodeIFlexalonNodesizeVector3minVector3maxVector3
Returns
- Bounds
TryGetCellAtLocalPoint(Vector3, out Vector3Int)
Finds the cell containing a point in the same layout space as TryGetCellBounds. Gaps belong to the nearest track; shared boundaries choose the lower track index.
public override bool TryGetCellAtLocalPoint(Vector3 localPoint, out Vector3Int cell)
Parameters
localPointVector3A point relative to the layout center, before transform scale and rotation.
cellVector3IntThe column, row, and layer containing the point.
Returns
- bool
True if the point is inside the solved grid, including its depth.
Upgrade(int)
Called when the component is upgraded to a new version of Flexalon.
protected override void Upgrade(int fromVersion)
Parameters
fromVersionint