Table of Contents

Interface Adapter

Namespace
Flexalon
Assembly
Flexalon.dll

Adapters determine how Flexalon measures other Unity components. See adapters documentation.

public interface Adapter

Methods

Measure(FlexalonNode, Vector3, Vector3, Vector3)

Measure the size of this node.

Bounds Measure(FlexalonNode node, Vector3 size, Vector3 min, Vector3 max)

Parameters

node FlexalonNode

The node to measure.

size Vector3

The size set by the Flexalon Object Component. The adapter should update any axis set to SizeType.Component.

min Vector3

The maximum size, determined by the MinSizeType.

max Vector3

The maximum size, determined by the MaxSizeType and the parent layout.

Returns

Bounds

The measured bounds to use in layout.

TryGetRectSize(FlexalonNode, out Vector2)

Return what the rect transform size should be.

bool TryGetRectSize(FlexalonNode node, out Vector2 rectSize)

Parameters

node FlexalonNode

The node to update.

rectSize Vector2

The desired rect size.

Returns

bool

True if the rect size should be modified.

TryGetScale(FlexalonNode, out Vector3)

Return what the gameObject's scale should be in local space.

bool TryGetScale(FlexalonNode node, out Vector3 scale)

Parameters

node FlexalonNode

The node to update.

scale Vector3

The desired scale.

Returns

bool

True if the scale should be modified.