Class Flexalon
Singleton class which tracks and updates all FlexalonNodes in the scene. See core concepts for more information.
Inheritance
Syntax
[ExecuteAlways]
[HelpURL("https://www.flexalon.com/docs/coreConcepts")]
public class Flexalon : MonoBehaviourFields
PreUpdate
Event invoked before Flexalon updates.
Declaration
public Action PreUpdateField Value
| Type | Description | 
|---|---|
| System.Action | 
Properties
InputProvider
Override the default InputProvider used by FlexalonInteractables to support other input devices.
Declaration
public InputProvider InputProvider { get; set; }Property Value
| Type | Description | 
|---|---|
| InputProvider | 
Nodes
Set of nodes representing GameObjects tracked by Flexalon.
Declaration
public IReadOnlyCollection<FlexalonNode> Nodes { get; }Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.IReadOnlyCollection<T><FlexalonNode> | 
RecordFrameChanges
Declaration
public static bool RecordFrameChanges { get; set; }Property Value
| Type | Description | 
|---|---|
| bool | 
SkipInactiveObjects
Determines if Flexalon should automatically skip inactive gameObjects in a layout.
Declaration
public bool SkipInactiveObjects { get; set; }Property Value
| Type | Description | 
|---|---|
| bool | 
UpdateInEditMode
Determines if Flexalon should automatically update in edit mode.
Declaration
public bool UpdateInEditMode { get; set; }Property Value
| Type | Description | 
|---|---|
| bool | 
UpdateInPlayMode
Determines if Flexalon should automatically update in play mode.
Declaration
public bool UpdateInPlayMode { get; set; }Property Value
| Type | Description | 
|---|---|
| bool | 
Methods
AddComponent(GameObject, Type)
Helper to ensure undo operation on AddComponent is handled correctly.
Declaration
public static Component AddComponent(GameObject go, Type type)Parameters
| Type | Name | Description | 
|---|---|---|
| UnityEngine.GameObject | go | |
| System.Type | type | 
Returns
| Type | Description | 
|---|---|
| UnityEngine.Component | 
AddComponent<T>(GameObject)
Helper to ensure undo operation on AddComponent is handled correctly.
Declaration
public static T AddComponent<T>(GameObject go) where T : ComponentParameters
| Type | Name | Description | 
|---|---|---|
| UnityEngine.GameObject | go | 
Returns
| Type | Description | 
|---|---|
| T | 
Type Parameters
| Name | Description | 
|---|---|
| T | 
ForceUpdate()
Marks every node and FlexalonComponent as dirty and calls UpdateDirtyNodes.
Declaration
public void ForceUpdate()Get()
Returns the singleton Flexalon component.
Declaration
public static Flexalon Get()Returns
| Type | Description | 
|---|---|
| Flexalon | The singleton Flexalon component, or null if it doesn't exist. | 
GetInputProvider()
Gets the current InputProvider used by FlexalonInteractables.
Declaration
public static InputProvider GetInputProvider()Returns
| Type | Description | 
|---|---|
| InputProvider | 
GetNode(GameObject)
Returns the FlexalonNode associated with the gameObject.
Declaration
public static FlexalonNode GetNode(GameObject go)Parameters
| Type | Name | Description | 
|---|---|---|
| UnityEngine.GameObject | go | The gameObject to get the FlexalonNode for. | 
Returns
| Type | Description | 
|---|---|
| FlexalonNode | The FlexalonNode associated with the gameObject, or null if it doesn't exist. | 
GetOrCreate()
Declaration
public static Flexalon GetOrCreate()Returns
| Type | Description | 
|---|---|
| Flexalon | 
GetOrCreateNode(GameObject)
Returns the FlexalonNode associated with the gameObject, or creates it if it doesn't exist.
Declaration
public static FlexalonNode GetOrCreateNode(GameObject go)Parameters
| Type | Name | Description | 
|---|---|---|
| UnityEngine.GameObject | go | The gameObject to get the FlexalonNode for. | 
Returns
| Type | Description | 
|---|---|
| FlexalonNode | The FlexalonNode associated with the gameObject. | 
UpdateDirtyNodes()
Updates all dirty nodes.
Declaration
public void UpdateDirtyNodes()