Class FlexalonInteractable
- Namespace
- Flexalon
- Assembly
- Flexalon.dll
Allows a gameObject to be clicked and dragged.
public class FlexalonInteractable : MonoBehaviour
- Inheritance
-
objectFlexalonInteractable
Properties
Bounds
If set, the object cannot be dragged outside of the bounds collider.
public Collider Bounds { get; set; }
Property Value
- Collider
Clickable
Determines if this object can be clicked and generate click events.
public bool Clickable { get; set; }
Property Value
- bool
Clicked
Unity Event invoked when the object is pressed and released within MaxClickTime.
public FlexalonInteractable.InteractableEvent Clicked { get; }
Property Value
DragEnd
Unity Event invoked when the object stops being dragged.
public FlexalonInteractable.InteractableEvent DragEnd { get; }
Property Value
Draggable
Determines if this object can be dragged and generate drag events.
public bool Draggable { get; set; }
Property Value
- bool
DragSiblingIndex
The sibling index that this object will be inserted into the drag target.
public int DragSiblingIndex { get; }
Property Value
- int
DragStart
Unity Event invoked when the object starts being dragged.
public FlexalonInteractable.InteractableEvent DragStart { get; }
Property Value
DragTarget
The drag target that will be attached if the dragged object is released.
public Transform DragTarget { get; }
Property Value
- Transform
DragTargetChanged
Event when the drag target or sibling index changes during a drag operation
public FlexalonInteractable.InteractableEvent DragTargetChanged { get; }
Property Value
Handle
GameObject to use to select and drag this object. If not set, uses self.
public GameObject Handle { get; set; }
Property Value
- GameObject
HideCursor
When checked, Cursor.visible is set to false when the object is dragged.
public bool HideCursor { get; set; }
Property Value
- bool
HoldOffset
public Vector3 HoldOffset { get; set; }
Property Value
- Vector3
HoldRotation
The rotation to apply to the object when it is being dragged.
public Quaternion HoldRotation { get; set; }
Property Value
- Quaternion
HoveredObject
The first hovered object.
public static FlexalonInteractable HoveredObject { get; }
Property Value
HoveredObjects
The currently hovered objects.
public static List<FlexalonInteractable> HoveredObjects { get; }
Property Value
- List<FlexalonInteractable>
HoverEnd
Unity Event invoked when the object stops being hovered.
public FlexalonInteractable.InteractableEvent HoverEnd { get; }
Property Value
HoverStart
Unity Event invoked when the object starts being hovered.
public FlexalonInteractable.InteractableEvent HoverStart { get; }
Property Value
InsertRadius
How close this object needs to a drag target's bounds to be inserted.
public float InsertRadius { get; set; }
Property Value
- float
InterpolationSpeed
How quickly the object moves towards the cursor when dragged.
public float InterpolationSpeed { get; set; }
Property Value
- float
LayerMask
When dragged, limits which Flexalon Drag Targets will accept this object by comparing the Layer Mask to the target GameObject's layer.
public LayerMask LayerMask { get; set; }
Property Value
- 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.
public Vector3 LineDirection { get; set; }
Property Value
- Vector3
LocalSpaceOffset
When checked, the Hold Offset is applied in local space.
public bool LocalSpaceOffset { get; set; }
Property Value
- bool
LocalSpaceRestriction
When checked, the Plane Normal and Line Direction are applied in local space.
public bool LocalSpaceRestriction { get; set; }
Property Value
- bool
LocalSpaceRotation
When checked, the Hold Rotation is applied in local space.
public bool LocalSpaceRotation { get; set; }
Property Value
- bool
MaxClickDistance
With a mouse or touch input, a click is defined as a press and release. The distance between press and release must be less than Max Click Distance to count as a click. Otherwise, the interaction is considered a drag.
public float MaxClickDistance { get; set; }
Property Value
- float
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.
public float MaxClickTime { get; set; }
Property Value
- 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.
public Vector3 PlaneNormal { get; set; }
Property Value
- Vector3
Restriction
Determines how to restrict the object's drag movement.
public FlexalonInteractable.RestrictionType Restriction { get; set; }
Property Value
RotateOnDrag
public bool RotateOnDrag { get; set; }
Property Value
- bool
SelectedObject
The first selected / dragged object.
public static FlexalonInteractable SelectedObject { get; }
Property Value
SelectedObjects
The currently selected / dragged objects.
public static List<FlexalonInteractable> SelectedObjects { get; }
Property Value
- List<FlexalonInteractable>
SelectEnd
Unity Event invoked when the object stops being selected (e.g. release mouse).
public FlexalonInteractable.InteractableEvent SelectEnd { get; }
Property Value
SelectStart
Unity Event invoked when the object starts being selected (e.g. press down mouse over object).
public FlexalonInteractable.InteractableEvent SelectStart { get; }
Property Value
State
The current state of the interactable.
public FlexalonInteractable.InteractableState State { get; }