Scrollable Class

Definition

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

C#
[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
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

Properties

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.

HoveringGazeInteractors

(Read Only) The list of IGazeInteractor components currently gazing this object.

(Inherited from MRTKBaseInteractable)
HoveringGazePinchInteractors

(Read Only) The list of IGazePinchInteractor components currently hovering this object.

(Inherited from MRTKBaseInteractable)
HoveringGrabInteractors

(Read Only) The list of IGrabInteractor components currently hovering this object.

(Inherited from MRTKBaseInteractable)
HoveringPokeInteractors

(Read Only) The list of IPokeInteractor components currently hovering this object.

(Inherited from MRTKBaseInteractable)
HoveringRayInteractors

(Read Only) The list of IRayInteractor components currently hovering this object.

(Inherited from MRTKBaseInteractable)
IsActiveHovered

Is this object hovered by any interactor other than passive targeting interactors?

(Inherited from MRTKBaseInteractable)
IsGazeHovered

Is this object hovered by any gaze interactor?

(Inherited from MRTKBaseInteractable)
IsGazePinchHovered

Is this object hovered by a gaze-pinch interactor?

(Inherited from MRTKBaseInteractable)
IsGazePinchSelected

Is this object selected by a gaze-pinch interactor?

(Inherited from MRTKBaseInteractable)
IsGrabHovered

Is this object hovered by a grab interactor?

(Inherited from MRTKBaseInteractable)
IsGrabSelected

Is this object selected by a grab interactor?

(Inherited from MRTKBaseInteractable)
IsPokeHovered

Is this object hovered by a near touch/poke interactor?

(Inherited from MRTKBaseInteractable)
IsPokeSelected

Is this object selected by a poke interactor?

(Inherited from MRTKBaseInteractable)
IsRayHovered

Is this object hovered by a non-gaze ray interactor?

(Inherited from MRTKBaseInteractable)
IsRaySelected

Is this object selected by a non-gaze ray interactor?

(Inherited from MRTKBaseInteractable)
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.

SelectingGazePinchInteractors

(Read Only) The list of IGazePinchInteractor components currently selecting this object.

(Inherited from MRTKBaseInteractable)
SelectingGrabInteractors

(Read Only) The list of IGrabInteractor components currently selecting this object.

(Inherited from MRTKBaseInteractable)

Methods

DisableInteractorType(SystemInterfaceType)

Adds the specified type to the set of interactors which cannot select this interactable

(Inherited from MRTKBaseInteractable)
EnableInteractorType(SystemInterfaceType)

Removes the specified type to the set of interactors which cannot select this interactable

(Inherited from MRTKBaseInteractable)
IsHoverableBy(IXRHoverInteractor) (Inherited from MRTKBaseInteractable)
IsInteractorTypeValid(IXRInteractor)

Is the given type of interactor permitted to interact with this interactable?

(Inherited from MRTKBaseInteractable)
IsSelectableBy(IXRSelectInteractor) (Inherited from MRTKBaseInteractable)
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)
OnHoverEntering(HoverEnterEventArgs) (Inherited from MRTKBaseInteractable)
OnHoverExited(HoverExitEventArgs) UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable.OnHoverExited(UnityEngine.XR.Interaction.Toolkit.HoverExitEventArgs)
OnHoverExiting(HoverExitEventArgs) (Inherited from MRTKBaseInteractable)
OnSelectEntered(SelectEnterEventArgs) UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable.OnSelectEntered(UnityEngine.XR.Interaction.Toolkit.SelectEnterEventArgs)
OnSelectEntering(SelectEnterEventArgs) (Inherited from MRTKBaseInteractable)
OnSelectExited(SelectExitEventArgs) UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable.OnSelectExited(UnityEngine.XR.Interaction.Toolkit.SelectExitEventArgs)
OnSelectExiting(SelectExitEventArgs) (Inherited from MRTKBaseInteractable)
ProcessInteractable(XRInteractionUpdateOrder+UpdatePhase) UnityEngine.XR.Interaction.Toolkit.IXRInteractable.ProcessInteractable(UnityEngine.XR.Interaction.Toolkit.XRInteractionUpdateOrder.UpdatePhase)

Applies to

Proizvod Verzije
MRTK3 UX Core 3.0, 3.1, 3.2