Table of Contents

Class FlexalonCore

Namespace
Flexalon
Assembly
Flexalon.dll

Static access to Flexalon's nodes, update events, and input settings.

public class FlexalonCore
Inheritance
object
FlexalonCore

Properties

InputProvider

The input provider used by Flexalon Interactables. Setting null restores the default FlexalonMouseInputProvider.

public static IFlexalonInputProvider InputProvider { get; set; }

Property Value

IFlexalonInputProvider

Nodes

Set of nodes representing GameObjects tracked by Flexalon.

public static IReadOnlyCollection<IFlexalonNode> Nodes { get; }

Property Value

IReadOnlyCollection<IFlexalonNode>

Methods

AddComponent(GameObject, Type)

Helper to ensure undo operation on AddComponent is handled correctly.

public static Component AddComponent(GameObject go, Type type)

Parameters

go GameObject
type Type

Returns

Component

AddComponent<T>(GameObject)

Helper to ensure undo operation on AddComponent is handled correctly.

public static T AddComponent<T>(GameObject go) where T : Component

Parameters

go GameObject

Returns

T

Type Parameters

T

CreateVirtualNode()

Creates a virtual node unbound to any gameObject.

public static IFlexalonNode CreateVirtualNode()

Returns

IFlexalonNode

DestroyVirtualNode(IFlexalonNode)

Destroys a virtual node.

public static void DestroyVirtualNode(IFlexalonNode node)

Parameters

node IFlexalonNode

ForceUpdate()

Marks every Flexalon component dirty and updates all layouts immediately.

public static void ForceUpdate()

GetNode(GameObject)

Returns the IFlexalonNode associated with the gameObject.

public static IFlexalonNode GetNode(GameObject go)

Parameters

go GameObject

The gameObject to get the IFlexalonNode for.

Returns

IFlexalonNode

The IFlexalonNode associated with the gameObject, or null if it doesn't exist.

GetOrCreateNode(GameObject)

Returns the IFlexalonNode associated with the gameObject, or creates it if it doesn't exist.

public static IFlexalonNode GetOrCreateNode(GameObject go)

Parameters

go GameObject

The gameObject to get the IFlexalonNode for.

Returns

IFlexalonNode

The IFlexalonNode associated with the gameObject.

UpdateDirtyNodes()

Updates any layouts that need it immediately, instead of waiting for LateUpdate.

public static void UpdateDirtyNodes()

Events

PostUpdate

Event invoked after Flexalon updates.

public static event Action PostUpdate

Event Type

Action

PreUpdate

Event invoked before Flexalon updates.

public static event Action PreUpdate

Event Type

Action