Language
Edit

UGUIInputAdapterDraggable Class

Definition

An extension of the UGUIInputAdapter that allows the interception of drag events. Add to any XRI interactable you wish to receive drags, such as sliders, handles, or even ObjectManipulators.

[UnityEngine.AddComponentMenu("MRTK/UX/UGUI Input Adapter Draggable")]
public class UGUIInputAdapterDraggable : MixedReality.Toolkit.UX.UGUIInputAdapter, UnityEngine.EventSystems.IDragHandler, UnityEngine.EventSystems.IInitializePotentialDragHandler
[<UnityEngine.AddComponentMenu("MRTK/UX/UGUI Input Adapter Draggable")>]
type UGUIInputAdapterDraggable = class
    inherit UGUIInputAdapter
    interface IDragHandler
    interface IEventSystemHandler
    interface IInitializePotentialDragHandler
Public Class UGUIInputAdapterDraggable
Inherits UGUIInputAdapter
Implements IDragHandler, IInitializePotentialDragHandler
Inheritance
UnityEngine.UI.Selectable
UGUIInputAdapterDraggable
Attributes
UnityEngine.AddComponentMenuAttribute
Implements
UnityEngine.EventSystems.IDragHandler UnityEngine.EventSystems.IEventSystemHandler UnityEngine.EventSystems.IInitializePotentialDragHandler

Constructors

Name Description
UGUIInputAdapterDraggable()

Properties

Name Description
InteractionManager

The interaction manager to use to query interactors and their registration events. Currently protected internal, may be exposed in a future update.

(Inherited from UGUIInputAdapter)
MovableAxes

Which axes should be used for manipulation instead of navigation? For sliders, this should match the slider axis.

(Inherited from UGUIInputAdapter)
OnMoveDelta

For the movable axes, what distance should be moved on each OnMove event?

(Inherited from UGUIInputAdapter)
ProxyInteractor

The associated UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable on behalf of which this shim will translate input events.

(Inherited from UGUIInputAdapter)
ThisInteractable

The associated UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable on behalf of which this adapter will translate input events.

(Inherited from UGUIInputAdapter)

Methods

Name Description
Awake()

A Unity event function that is called when an enabled script instance is being loaded.

(Inherited from UGUIInputAdapter)
Click()

Click the interactable. This will result in the interactable being selected and then deselected after a short period of time. This is the same behavior that occurs when this adapter receives a Unity UGUI OnSubmit(BaseEventData) event.

(Inherited from UGUIInputAdapter)
IsXRUIEvent(PointerEventData)

Test if the given event data corresponds to a Unity XRI interactor.

(Inherited from UGUIInputAdapter)
Move(Vector3)

OnMoves on UnityUI elements are equivalent to selecting, moving, and deselecting with XRI. This coroutine has a single-frame delay between these actions to ensure XRI synchronizes and recognizes these inputs. The object-local delta is scaled by the OnMoveDelta value.

(Inherited from UGUIInputAdapter)
OnDeselect(BaseEventData)

Unset selection and transition to appropriate state.

(Inherited from UGUIInputAdapter)
OnDisable()

A Unity event function that is called when the script component has been disabled.

(Inherited from UGUIInputAdapter)
OnDrag(PointerEventData)

When dragging is occurring this will be called every time the cursor is moved.

OnInitializePotentialDrag(PointerEventData)

Called when a drag has been found but before it is valid to begin the drag.

OnInteractorRegistered(InteractorRegisteredEventArgs)

Called when a an UnityEngine.XR.Interaction.Toolkit.IXRInteractor is registered with a Unity UnityEngine.XR.Interaction.Toolkit.XRInteractionManager.

(Inherited from UGUIInputAdapter)
OnInteractorUnregistered(InteractorUnregisteredEventArgs)

Called when a an UnityEngine.XR.Interaction.Toolkit.IXRInteractor is unregistered with a Unity UnityEngine.XR.Interaction.Toolkit.XRInteractionManager.

(Inherited from UGUIInputAdapter)
OnMove(AxisEventData)

Determine in which of the 4 move directions the next selectable object should be found.

(Inherited from UGUIInputAdapter)
OnPointerDown(PointerEventData)

Evaluate eventData and transition to appropriate state.

OnPointerEnter(PointerEventData)

Evaluate current state and transition to appropriate state. New state could be pressed or hover depending on pressed state.

(Inherited from UGUIInputAdapter)
OnPointerExit(PointerEventData)

Evaluate current state and transition to normal state.

(Inherited from UGUIInputAdapter)
OnPointerUp(PointerEventData)

Evaluate eventData and transition to appropriate state.

(Inherited from UGUIInputAdapter)
OnSelect(BaseEventData)

Set selection and transition to appropriate state.

(Inherited from UGUIInputAdapter)
OnSubmit(BaseEventData)

Called when the Unity UGUI element is selected.

(Inherited from UGUIInputAdapter)
OnValidate()

A Unity Editor only event function that is called when the script is loaded or a value changes in the Unity Inspector.

(Inherited from UGUIInputAdapter)

Applies to