Interface IFlexalonAdapter
- Namespace
- Flexalon
- Assembly
- Flexalon.dll
Adapters determine how Flexalon measures other Unity components. See adapters documentation.
public interface IFlexalonAdapter
Methods
Measure(IFlexalonNode, Vector3, Vector3, Vector3)
Measure the size of this node.
Bounds Measure(IFlexalonNode node, Vector3 size, Vector3 min, Vector3 max)
Parameters
nodeIFlexalonNodeThe node to measure.
sizeVector3The size set by the Flexalon Object Component. The adapter should update any axis set to SizeType.Component.
minVector3The maximum size, determined by the MinSizeType.
maxVector3The maximum size, determined by the MaxSizeType and the parent layout.
Returns
- Bounds
The measured bounds to use in layout. Bounds are relative to the transform origin, so RectTransform adapters should account for RectTransform.pivot in Bounds.center.
TryGetRectSize(IFlexalonNode, out Vector2)
Return what the rect transform size should be.
bool TryGetRectSize(IFlexalonNode node, out Vector2 rectSize)
Parameters
nodeIFlexalonNodeThe node to update.
rectSizeVector2The desired rect size.
Returns
- bool
True if the rect size should be modified.
TryGetScale(IFlexalonNode, out Vector3)
Return what the gameObject's scale should be in local space.
bool TryGetScale(IFlexalonNode node, out Vector3 scale)
Parameters
nodeIFlexalonNodeThe node to update.
scaleVector3The desired scale.
Returns
- bool
True if the scale should be modified.