Class LayoutBase
Base class for all layout componets. See custom layout for details on how to extend this class. Assigns the Layout method to FlexalonNode and keeps the node's children up to date.
Inheritance
object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
LayoutBase
Implements
Inherited Members
Syntax
[DisallowMultipleComponent]
[RequireComponent(typeof(FlexalonObject))]
public abstract class LayoutBase : FlexalonComponent, Layout
Methods
Arrange(FlexalonNode, Vector3)
Position the children of node within the available bounds.
Declaration
public virtual void Arrange(FlexalonNode node, Vector3 layoutSize)
Parameters
Type | Name | Description |
---|---|---|
FlexalonNode | node | |
UnityEngine.Vector3 | layoutSize |
DoOnDisable()
Called when the component is disabled.
Declaration
protected override void DoOnDisable()
Overrides
DoOnEnable()
Called when the component is enabled.
Declaration
protected override void DoOnEnable()
Overrides
Initialize()
Declaration
protected override void Initialize()
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 virtual 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 |
ResetProperties()
Called when the component is destroyed to reset properties on the FlexalonNode.
Declaration
protected override void ResetProperties()
Overrides
SetChildrenFillShrinkSize(FlexalonNode, Vector3, Vector3)
Helper to assign the fill and shrink size for all children.
Declaration
protected void SetChildrenFillShrinkSize(FlexalonNode node, Vector3 childSize, Vector3 layoutSize)
Parameters
Type | Name | Description |
---|---|---|
FlexalonNode | node | |
UnityEngine.Vector3 | childSize | |
UnityEngine.Vector3 | layoutSize |