Table of Contents

Class FlexalonAnimator

Namespace
Flexalon
Assembly
Flexalon.dll

Animates an object between named states, such as Hidden and Visible, and smooths its layout changes. Each state has tracks that animate position, rotation, scale, rect size, or another component's properties.

[AddComponentMenu("Flexalon/Flexalon Animator")]
public class FlexalonAnimator : MonoBehaviour, IFlexalonTransformUpdater
Inheritance
object
Object
Component
Behaviour
MonoBehaviour
FlexalonAnimator
Implements

Properties

ExpressionError

Last position expression error, or null after a successful evaluation.

public string ExpressionError { get; }

Property Value

string

InterpolateInWorldSpace

Whether layout changes are interpolated in world space, so the object glides when its ancestors move too. When false, they're interpolated in the parent's space and the object moves with its ancestors.

public bool InterpolateInWorldSpace { get; set; }

Property Value

bool

InterpolateLayoutChanges

When the layout moves, rotates, scales, or resizes this object outside a transition, interpolate toward the new layout values instead of snapping to them.

public bool InterpolateLayoutChanges { get; set; }

Property Value

bool

InterpolatePosition

Interpolate position layout changes when SeparateInterpolations is enabled. Uses InterpolationSpeed.

public bool InterpolatePosition { get; set; }

Property Value

bool

InterpolateRectSize

Interpolate RectTransform size layout changes when SeparateInterpolations is enabled.

public bool InterpolateRectSize { get; set; }

Property Value

bool

InterpolateRotation

Interpolate rotation layout changes when SeparateInterpolations is enabled.

public bool InterpolateRotation { get; set; }

Property Value

bool

InterpolateScale

Interpolate scale layout changes when SeparateInterpolations is enabled.

public bool InterpolateScale { get; set; }

Property Value

bool

InterpolationSpeed

Amount layout changes are interpolated toward the layout each frame, multiplied by Time.smoothDeltaTime. Used by every property unless SeparateInterpolations is enabled, and always by position.

public float InterpolationSpeed { get; set; }

Property Value

float

Node

The Flexalon node for this GameObject.

public IFlexalonNode Node { get; }

Property Value

IFlexalonNode

RectSizeInterpolationSpeed

RectTransform size interpolation speed when SeparateInterpolations is enabled, multiplied by Time.smoothDeltaTime.

public float RectSizeInterpolationSpeed { get; set; }

Property Value

float

RotationInterpolationSpeed

Rotation interpolation speed when SeparateInterpolations is enabled, multiplied by Time.smoothDeltaTime.

public float RotationInterpolationSpeed { get; set; }

Property Value

float

ScaleInterpolationSpeed

Scale interpolation speed when SeparateInterpolations is enabled, multiplied by Time.smoothDeltaTime.

public float ScaleInterpolationSpeed { get; set; }

Property Value

float

SeparateInterpolations

Enable layout change interpolation and set its speed separately for each property.

public bool SeparateInterpolations { get; set; }

Property Value

bool

StaggerOrder

The order used by a Flexalon Animator Driver in CustomOrder mode. Animators with the same order start together.

public int StaggerOrder { get; set; }

Property Value

int

State

The state currently being animated, including interaction states.

public string State { get; }

Property Value

string

StateDefinitions

The states this animator can play.

public List<FlexalonAnimationState> StateDefinitions { get; }

Property Value

List<FlexalonAnimationState>

Transitions

The timing and easing used between states.

public List<FlexalonAnimationTransition> Transitions { get; }

Property Value

List<FlexalonAnimationTransition>

Methods

PreUpdate(IFlexalonNode)

Called before the layout system starts updating any transforms. Use this to capture the transform position. Settled nodes with unchanged inputs can be skipped; use MarkDirtyTransformUpdater to request another update.

public void PreUpdate(IFlexalonNode node)

Parameters

node IFlexalonNode

The node being updated.

StartTransition(string)

Transitions to a state. While the requested state is Visible, an interactable on this GameObject can refine it to Hover, Press, or Drag.

public void StartTransition(string state)

Parameters

state string

UpdatePosition(IFlexalonNode, Vector3)

Called to update the position of the object.

public bool UpdatePosition(IFlexalonNode node, Vector3 position)

Parameters

node IFlexalonNode

The node being updated.

position Vector3

The computed local position of the object.

Returns

bool

UpdateRectSize(IFlexalonNode, Vector2)

Called to update the rect of the object.

public bool UpdateRectSize(IFlexalonNode node, Vector2 size)

Parameters

node IFlexalonNode

The node being updated.

size Vector2

Returns

bool

UpdateRotation(IFlexalonNode, Quaternion)

Called to update the rotation of the object.

public bool UpdateRotation(IFlexalonNode node, Quaternion rotation)

Parameters

node IFlexalonNode

The node being updated.

rotation Quaternion

The computed local rotation of the object.

Returns

bool

UpdateScale(IFlexalonNode, Vector3)

Called to update the scale of the object.

public bool UpdateScale(IFlexalonNode node, Vector3 scale)

Parameters

node IFlexalonNode

The node being updated.

scale Vector3

The computed local scale of the object.

Returns

bool