API reference

DiscreteScrollInputProvider Class

Extends MonoBehaviour
Enables scrolling of UI ScrollRects in response to discrete directional scroll commands from any source, coupled to a single interactor via IInteractorView.
Callers drive scrolling by invoking the public Scroll(Vector2) method (or the ScrollUp/ScrollDown/ ScrollLeft/ScrollRight convenience wrappers) - for example from a microgesture event wrapper, keyboard input, or on-screen buttons. While the interactor is hovering it tracks the hovered UI selectable via PointableCanvasModule.WhenObjectHovered / PointableCanvasModule.WhenObjectUnhovered (matched by IInteractorView.Identifier), resolves the hovered ScrollRect immediately, and applies scroll impulses to it. Momentum/velocity physics is delegated to a reusable ScrollRectVelocityDriver.

Protected Fields

_started : bool
Signature
bool Oculus.Interaction.DiscreteScrollInputProvider._started

Fields

CurrentScrollRect : ScrollRect
The ScrollRect currently tracked from the interactor's hovered target, or null when there is no valid target.
Signature
ScrollRect Oculus.Interaction.DiscreteScrollInputProvider.CurrentScrollRect

Properties

ScrollSpeed : float
[Get][Set]
The speed at which scrolling occurs.
Multiplies viewport size to determine velocity.
Signature
float Oculus.Interaction.DiscreteScrollInputProvider.ScrollSpeed
StopMomentumOnTargetChange : bool
[Get][Set]
Whether scrolling stops immediately when the interactor's target changes.
Signature
bool Oculus.Interaction.DiscreteScrollInputProvider.StopMomentumOnTargetChange

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.DiscreteScrollInputProvider.Awake()
Returns
void
OnDisable ()
Signature
virtual void Oculus.Interaction.DiscreteScrollInputProvider.OnDisable()
Returns
void
OnEnable ()
Signature
virtual void Oculus.Interaction.DiscreteScrollInputProvider.OnEnable()
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.DiscreteScrollInputProvider.Start()
Returns
void
Update ()
Signature
virtual void Oculus.Interaction.DiscreteScrollInputProvider.Update()
Returns
void

Methods

InjectAllDiscreteScrollInputProvider ( interactorView )
Signature
void Oculus.Interaction.DiscreteScrollInputProvider.InjectAllDiscreteScrollInputProvider(IInteractorView interactorView)
Parameters
interactorView: IInteractorView
Returns
void
InjectInteractorView ( interactorView )
Signature
void Oculus.Interaction.DiscreteScrollInputProvider.InjectInteractorView(IInteractorView interactorView)
Parameters
interactorView: IInteractorView
Returns
void
Scroll ( direction )
Applies a discrete scroll impulse to the currently tracked ScrollRect in the given direction.
Vector2.up produces positive velocity.y (content scrolls up); the other cardinal directions follow the same convention. Non-cardinal directions are resolved by their dominant axis. A zero direction is treated as a stop signal, immediately cancelling any in-flight momentum. No-ops when there is no valid tracked target.
Signature
void Oculus.Interaction.DiscreteScrollInputProvider.Scroll(Vector2 direction)
Parameters
direction: Vector2
Returns
void
ScrollDown ()
Scrolls the tracked ScrollRect content downward.
Signature
void Oculus.Interaction.DiscreteScrollInputProvider.ScrollDown()
Returns
void
ScrollLeft ()
Scrolls the tracked ScrollRect content left.
Signature
void Oculus.Interaction.DiscreteScrollInputProvider.ScrollLeft()
Returns
void
ScrollRight ()
Scrolls the tracked ScrollRect content right.
Signature
void Oculus.Interaction.DiscreteScrollInputProvider.ScrollRight()
Returns
void
ScrollUp ()
Scrolls the tracked ScrollRect content upward.
Signature
void Oculus.Interaction.DiscreteScrollInputProvider.ScrollUp()
Returns
void