TouchSlider Class

Definition

This control enables touching a slider with one finger to set its value

C++
public ref class TouchSlider : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::Input::IMixedRealityTouchHandler, UnityEngine::EventSystems::IEventSystemHandler
Inheritance
UnityEngine.MonoBehaviour
TouchSlider
Implements
IMixedRealityTouchHandler UnityEngine.EventSystems.IEventSystemHandler

Constructors

Methods

OnTouchCompleted(HandTrackingInputEventData)
OnTouchStarted(HandTrackingInputEventData)
OnTouchUpdated(HandTrackingInputEventData)

When the collider is touched, use the touch point to Calculate the Slider value

UpdateSliderText()

This can get called from a pinch slider's OnValueChanged event to display the text value

Applies to

Product Versions
MRTK2 Unity 2018 2.7.0
MRTK2 Unity 2019 2.7.0
MRTK2 Unity 2020 2.7.0