Language
Edit

Scrollable Class

Definition

An IScrollable that allows a ScrollRect to be scrolled by Unity IXRInteractors.

[UnityEngine.AddComponentMenu("MRTK/UX/Scrollable")]
[UnityEngine.RequireComponent(typeof(MixedReality.Toolkit.Experimental.InteractableEventRouter))]
public class Scrollable : MixedReality.Toolkit.MRTKBaseInteractable, MixedReality.Toolkit.Experimental.IXRHoverInteractableParent, MixedReality.Toolkit.Experimental.IXRSelectInteractableParent, MixedReality.Toolkit.IScrollable
[<UnityEngine.AddComponentMenu("MRTK/UX/Scrollable")>]
[<UnityEngine.RequireComponent(typeof(MixedReality.Toolkit.Experimental.InteractableEventRouter))>]
type Scrollable = class
    inherit MRTKBaseInteractable
    interface IScrollable
    interface IXRInteractable
    interface IXRHoverInteractableParent
    interface IXRInteractableEventRouteTarget
    interface IXRSelectInteractableParent
Public Class Scrollable
Inherits MRTKBaseInteractable
Implements IScrollable, IXRHoverInteractableParent, IXRSelectInteractableParent
Inheritance
UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable
Scrollable
Attributes
UnityEngine.AddComponentMenuAttribute UnityEngine.RequireComponentAttribute
Implements

Remarks

In order to receive child select and hover event, this Scrollable object requires a InteractableEventRouter component be added to the Unity game object as well.

This is an experimental feature. This class is early in the cycle, it has been labeled as experimental to indicate that it is still evolving, and subject to change over time. Parts of the MRTK, such as this class, appear to have a lot of value even if the details haven't fully been fleshed out. For these types of features, we want the community to see them and get value out of them early enough so to provide feedback.

Constructors

Name Description
Scrollable()

Properties

Name Description
CancelSelectDistance

The scroll distance at which to cancel any child interactable's selection.

DeadZone

Once the ScrollingInteractor moves this distance or more, this component will start changing scroll positions of the ScrollRect.

IsScrolling

Get if the ScrollableTransform is currently being scrolled or moved.

MoveLerpTime

Enter amount representing amount of smoothing to apply to the movement. Smoothing of 0 means no smoothing. Max value means no change to value.

PokeCancelSelectDistance

The scroll distance at which to cancel any child interactable's selection.

PokeDeadZone

Once the ScrollingInteractor moves this distance or more, this component will start changing scroll positions of the ScrollRect.

ScrollableTransform

Get the transform that is backing this scrollable region.

ScrollingInteractor

Get the Unity IXRInteractor that is scrolling or will scroll the specified ScrollableTransform.

ScrollingLocalAnchorPosition

Get the local position of ScrollingInteractor at the start of the scroll operation.

ScrollRect

The Unity ScrollRect to scroll.

Methods

Name Description
OnChildHoverEntered(HoverEnterEventArgs)

When a child game object's interactable receives a "hover entered" event, this function will be invoked.

OnChildHoverExited(HoverExitEventArgs)

When a child game object's interactable receives a "hover exited" event, this function will be invoked.

OnChildSelectEntered(SelectEnterEventArgs)

When a child game object's interactable receives a "select entered" event, this function will be invoked.

OnChildSelectExited(SelectExitEventArgs)

When a child game object's interactable receives a "select exited" event, this function will be invoked.

OnHoverEntered(HoverEnterEventArgs) UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable.OnHoverEntered(UnityEngine.XR.Interaction.Toolkit.HoverEnterEventArgs)
OnHoverExited(HoverExitEventArgs) UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable.OnHoverExited(UnityEngine.XR.Interaction.Toolkit.HoverExitEventArgs)
OnSelectEntered(SelectEnterEventArgs) UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable.OnSelectEntered(UnityEngine.XR.Interaction.Toolkit.SelectEnterEventArgs)
OnSelectExited(SelectExitEventArgs) UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable.OnSelectExited(UnityEngine.XR.Interaction.Toolkit.SelectExitEventArgs)
ProcessInteractable(XRInteractionUpdateOrder+UpdatePhase) UnityEngine.XR.Interaction.Toolkit.IXRInteractable.ProcessInteractable(UnityEngine.XR.Interaction.Toolkit.XRInteractionUpdateOrder.UpdatePhase)

Applies to