Slider Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A slider that can be moved by grabbing / pinching a slider thumb
[UnityEngine.AddComponentMenu("MRTK/UX/Slider")]
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/sliders")]
public class Slider : MixedReality.Toolkit.StatefulInteractable, MixedReality.Toolkit.ISnapInteractable
[<UnityEngine.AddComponentMenu("MRTK/UX/Slider")>]
[<UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/sliders")>]
type Slider = class
inherit StatefulInteractable
interface ISnapInteractable
Public Class Slider
Inherits StatefulInteractable
Implements ISnapInteractable
- Inheritance
-
UnityEngine.XR.Interaction.Toolkit.XRBaseInteractableSlider
- Attributes
-
UnityEngine.AddComponentMenuAttribute UnityEngine.HelpURLAttribute
- Implements
Allow |
Does the interactable allow triggering select via a voice command? If true, voice command can be used to trigger "select" on the interactable (Inherited from StatefulInteractable) |
Deselect |
The threshold of selection progress at which the interactable will be deselected. (Inherited from StatefulInteractable) |
Far |
Time required for far ray dwell (Inherited from StatefulInteractable) |
Gaze |
Time required for gaze dwell (Inherited from StatefulInteractable) |
Handle |
Called by interactors to query which exact transform on an interactable should be considered the snappable affordance. |
Hovering |
(Read Only) The list of IGazeInteractor components currently gazing this object. (Inherited from MRTKBaseInteractable) |
Hovering |
(Read Only) The list of IGazePinchInteractor components currently hovering this object. (Inherited from MRTKBaseInteractable) |
Hovering |
(Read Only) The list of IGrabInteractor components currently hovering this object. (Inherited from MRTKBaseInteractable) |
Hovering |
(Read Only) The list of IPokeInteractor components currently hovering this object. (Inherited from MRTKBaseInteractable) |
Hovering |
(Read Only) The list of IRayInteractor components currently hovering this object. (Inherited from MRTKBaseInteractable) |
Is |
Is this object hovered by any interactor other than passive targeting interactors? (Inherited from MRTKBaseInteractable) |
Is |
Is this object hovered by any gaze interactor? (Inherited from MRTKBaseInteractable) |
Is |
Is this object hovered by a gaze-pinch interactor? (Inherited from MRTKBaseInteractable) |
Is |
Is this object selected by a gaze-pinch interactor? (Inherited from MRTKBaseInteractable) |
Is |
Is this object hovered by a grab interactor? (Inherited from MRTKBaseInteractable) |
Is |
Is this object selected by a grab interactor? (Inherited from MRTKBaseInteractable) |
Is |
Is this object hovered by a near touch/poke interactor? (Inherited from MRTKBaseInteractable) |
Is |
Is this object selected by a poke interactor? (Inherited from MRTKBaseInteractable) |
Is |
Is this object hovered by a non-gaze ray interactor? (Inherited from MRTKBaseInteractable) |
Is |
Is this object selected by a non-gaze ray interactor? (Inherited from MRTKBaseInteractable) |
Is |
Is the interactable toggled? (Inherited from StatefulInteractable) |
Is |
Whether or not this slider is manipulatable by IPokeInteractors. If true, IGrabInteractors will have no effect. |
Max |
The maximum value that the slider can take on |
Min |
The minimum value that the slider can take on |
Normalized |
The slider's normalized value calculated using the MinValue and MaxValue properties. |
On |
Fired when the interactable is fully clicked (select + deselect) (Inherited from StatefulInteractable) |
On |
Fired when the interactable is disabled (Inherited from StatefulInteractable) |
On |
Fired when the interactable is enabled (Inherited from StatefulInteractable) |
On |
A Unity event that is invoked when Value changes. |
Selecting |
(Read Only) The list of IGazePinchInteractor components currently selecting this object. (Inherited from MRTKBaseInteractable) |
Selecting |
(Read Only) The list of IGrabInteractor components currently selecting this object. (Inherited from MRTKBaseInteractable) |
Select |
Does the interactable require the interactor to hover over it? If true, then the OnClick event will only get fired while this Interactable is being hovered. (Inherited from StatefulInteractable) |
Select |
The threshold of selection progress at which the interactable will be selected. (Inherited from StatefulInteractable) |
Slider |
A transform marking the end point of the slider track. |
Slider |
A transform marking the starting point of the slider track. |
Slider |
Property accessor of sliderStepDivisions, it holds the number of subdivisions the slider is split into. |
Slider |
Returns the vector from the slider start to end positions |
Slider |
Obsolete.
The current value of the slider. |
Snap |
Determines whether or not this slider snaps to the designated position on the slider. Grab interactions will not snap, regardless of the value of this property. |
Speech |
Speech keyword required for triggering "select" on the interactable (Inherited from StatefulInteractable) |
Start |
The interaction point at the beginning of an interaction. |
Start |
Float value that holds the starting value of the slider. |
Toggle |
The toggle behavior of the interactable. Set OneWayToggle for radio buttons. (Inherited from StatefulInteractable) |
Track |
Collider that covers the entire slider track area. |
Trigger |
Should the user be required to fully select and deselect the interactable for Click and Toggle to fire? (Inherited from StatefulInteractable) |
Use |
Should hovering the object with a far ray for a certain amount of time select it? (Inherited from StatefulInteractable) |
Use |
Should gazing at the object for a certain amount of time select it? (Inherited from StatefulInteractable) |
Use |
Property accessor of useSliderStepDivisions, it determines whether the slider steps according to subdivisions or continuously. |
Value |
The current value of the slider |
Voice |
Does the voice command require this to have focus? If true, then the voice command will only respond to voice commands while this Interactable has focus. (Inherited from StatefulInteractable) |
Apply |
Invoked on Start(), Awake(), and Reset() to apply required settings to this Slider instance. |
Awake() |
A Unity event function that is called when an enabled script instance is being loaded. |
Can |
This function determines whether the interactable should fire a click event at a given select event. Subclasses can override this to add additional requirements for full click/toggle activation, such as roll-off prevention. (Inherited from StatefulInteractable) |
Can |
This function determines whether the interactable should fire a click event at a given deselect event. Subclasses can override this to add additional requirements for full click/toggle activation, such as roll-off prevention. (Inherited from StatefulInteractable) |
Disable |
Adds the specified type to the set of interactors which cannot select this interactable (Inherited from MRTKBaseInteractable) |
Enable |
Removes the specified type to the set of interactors which cannot select this interactable (Inherited from MRTKBaseInteractable) |
Force |
Forcibly toggle the interactable. (Inherited from StatefulInteractable) |
Force |
Forcibly toggle the interactable and fire the relevant events. This is a single-arg overload for ForceSetToggled for use with UnityEvents. Consider using ForceSetToggled(bool, bool) instead, especially if you'd like to suppress the resulting toggle events. (Inherited from StatefulInteractable) |
Get |
Get the current selection progress of this StatefulInteractable. (Inherited from StatefulInteractable) |
Is |
(Inherited from MRTKBaseInteractable) |
Is |
Is the given type of interactor permitted to interact with this interactable? (Inherited from MRTKBaseInteractable) |
Is |
UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable.IsSelectableBy(UnityEngine.XR.Interaction.Toolkit.IXRSelectInteractor) |
On |
A Unity event function that is called when the script component has been destroyed. (Inherited from StatefulInteractable) |
On |
A Unity event function that is called when the script component has been disabled. (Inherited from StatefulInteractable) |
On |
A Unity event function that is called when the script component has been enabled. (Inherited from StatefulInteractable) |
On |
(Inherited from StatefulInteractable) |
On |
(Inherited from MRTKBaseInteractable) |
On |
(Inherited from MRTKBaseInteractable) |
On |
(Inherited from StatefulInteractable) |
On |
UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable.OnSelectEntered(UnityEngine.XR.Interaction.Toolkit.SelectEnterEventArgs) |
On |
(Inherited from MRTKBaseInteractable) |
On |
(Inherited from MRTKBaseInteractable) |
Process |
UnityEngine.XR.Interaction.Toolkit.XRBaseInteractable.ProcessInteractable(UnityEngine.XR.Interaction.Toolkit.XRInteractionUpdateOrder.UpdatePhase) |
Reset() |
A Unity event function that is called when the script should reset it's default values |
Start() |
A Unity event function that is called on the frame when a script is enabled just before any of the update methods are called the first time. |
Proizvod | Verzije |
---|---|
MRTK3 UX Core | 3.0, 3.1, 3.2 |