Search Results for

    Show / Hide Table of Contents

    Class FlexalonInteractable

    Allows a gameObject to be clicked and dragged.

    Inheritance
    object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    FlexalonInteractable
    Syntax
    [AddComponentMenu("Flexalon/Flexalon Interactable")]
    [HelpURL("https://www.flexalon.com/docs/interactable")]
    [DisallowMultipleComponent]
    public class FlexalonInteractable : MonoBehaviour

    Properties

    Bounds

    If set, the object cannot be dragged outside of the bounds collider.

    Declaration
    public Collider Bounds { get; set; }
    Property Value
    Type Description
    UnityEngine.Collider

    Clickable

    Determines if this object can be clicked and generate click events.

    Declaration
    public bool Clickable { get; set; }
    Property Value
    Type Description
    bool

    Clicked

    Unity Event invoked when the object is pressed and released within MaxClickTime.

    Declaration
    public FlexalonInteractable.InteractableEvent Clicked { get; }
    Property Value
    Type Description
    FlexalonInteractable.InteractableEvent

    DragEnd

    Unity Event invoked when the object stops being dragged.

    Declaration
    public FlexalonInteractable.InteractableEvent DragEnd { get; }
    Property Value
    Type Description
    FlexalonInteractable.InteractableEvent

    Draggable

    Determines if this object can be dragged and generate drag events.

    Declaration
    public bool Draggable { get; set; }
    Property Value
    Type Description
    bool

    DragStart

    Unity Event invoked when the object starts being dragged.

    Declaration
    public FlexalonInteractable.InteractableEvent DragStart { get; }
    Property Value
    Type Description
    FlexalonInteractable.InteractableEvent

    Handle

    GameObject to use to select and drag this object. If not set, uses self.

    Declaration
    public GameObject Handle { get; set; }
    Property Value
    Type Description
    UnityEngine.GameObject

    HideCursor

    When checked, Cursor.visible is set to false when the object is dragged.

    Declaration
    public bool HideCursor { get; set; }
    Property Value
    Type Description
    bool

    HoldOffset

    Declaration
    public Vector3 HoldOffset { get; set; }
    Property Value
    Type Description
    UnityEngine.Vector3

    HoldRotation

    The rotation to apply to the object when it is being dragged.

    Declaration
    public Quaternion HoldRotation { get; set; }
    Property Value
    Type Description
    UnityEngine.Quaternion

    HoveredObject

    The first hovered object.

    Declaration
    public static FlexalonInteractable HoveredObject { get; }
    Property Value
    Type Description
    FlexalonInteractable

    HoveredObjects

    The currently hovered objects.

    Declaration
    public static List<FlexalonInteractable> HoveredObjects { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<T><FlexalonInteractable>

    HoverEnd

    Unity Event invoked when the object stops being hovered.

    Declaration
    public FlexalonInteractable.InteractableEvent HoverEnd { get; }
    Property Value
    Type Description
    FlexalonInteractable.InteractableEvent

    HoverStart

    Unity Event invoked when the object starts being hovered.

    Declaration
    public FlexalonInteractable.InteractableEvent HoverStart { get; }
    Property Value
    Type Description
    FlexalonInteractable.InteractableEvent

    InsertRadius

    How close this object needs to a drag target's bounds to be inserted.

    Declaration
    public float InsertRadius { get; set; }
    Property Value
    Type Description
    float

    InterpolationSpeed

    How quickly the object moves towards the cursor when dragged.

    Declaration
    public float InterpolationSpeed { get; set; }
    Property Value
    Type Description
    float

    LayerMask

    When dragged, limits which Flexalon Drag Targets will accept this object by comparing the Layer Mask to the target GameObject's layer.

    Declaration
    public LayerMask LayerMask { get; set; }
    Property Value
    Type Description
    UnityEngine.LayerMask

    LineDirection

    Defines the direction of the line when using a line restriction. If 'Local Space'is checked, this direction is rotated by the transform of the layout that the object started in.

    Declaration
    public Vector3 LineDirection { get; set; }
    Property Value
    Type Description
    UnityEngine.Vector3

    LocalSpaceOffset

    When checked, the Hold Offset is applied in local space.

    Declaration
    public bool LocalSpaceOffset { get; set; }
    Property Value
    Type Description
    bool

    LocalSpaceRestriction

    When checked, the Plane Normal and Line Direction are applied in local space.

    Declaration
    public bool LocalSpaceRestriction { get; set; }
    Property Value
    Type Description
    bool

    LocalSpaceRotation

    When checked, the Hold Rotation is applied in local space.

    Declaration
    public bool LocalSpaceRotation { get; set; }
    Property Value
    Type Description
    bool

    MaxClickTime

    With a mouse or touch input, a click is defined as a press and release. The time between press and release must be less than Max Click Time to count as a click. A drag interaction cannot start until Max Click Time is exceeded.

    Declaration
    public float MaxClickTime { get; set; }
    Property Value
    Type Description
    float

    PlaneNormal

    Defines the normal of the plane when using a plane restriction. If 'Local Space' is checked, this normal is rotated by the transform of the layout that the object started in.

    Declaration
    public Vector3 PlaneNormal { get; set; }
    Property Value
    Type Description
    UnityEngine.Vector3

    Restriction

    Determines how to restrict the object's drag movement.

    Declaration
    public FlexalonInteractable.RestrictionType Restriction { get; set; }
    Property Value
    Type Description
    FlexalonInteractable.RestrictionType

    RotateOnDrag

    Declaration
    public bool RotateOnDrag { get; set; }
    Property Value
    Type Description
    bool

    SelectedObject

    The first selected / dragged object.

    Declaration
    public static FlexalonInteractable SelectedObject { get; }
    Property Value
    Type Description
    FlexalonInteractable

    SelectedObjects

    The currently selected / dragged objects.

    Declaration
    public static List<FlexalonInteractable> SelectedObjects { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<T><FlexalonInteractable>

    SelectEnd

    Unity Event invoked when the object stops being selected (e.g. release mouse).

    Declaration
    public FlexalonInteractable.InteractableEvent SelectEnd { get; }
    Property Value
    Type Description
    FlexalonInteractable.InteractableEvent

    SelectStart

    Unity Event invoked when the object starts being selected (e.g. press down mouse over object).

    Declaration
    public FlexalonInteractable.InteractableEvent SelectStart { get; }
    Property Value
    Type Description
    FlexalonInteractable.InteractableEvent

    State

    The current state of the interactable.

    Declaration
    public FlexalonInteractable.InteractableState State { get; }
    Property Value
    Type Description
    FlexalonInteractable.InteractableState
    In This Article
    Back to top Flexalon 3D Layouts