mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class DwellHandler

    Use this component to add a Dwell modality (https://docs.microsoft.com/windows/mixed-reality/gaze-and-dwell) to the UI target.

    Inheritance
    Object
    DwellHandler
    CustomDwellHandler
    Implements
    IMixedRealityFocusHandler
    MonoBehaviour
    Namespace: Microsoft.MixedReality.Toolkit.Experimental.Dwell
    Assembly: cs.temp.dll.dll
    Syntax
    public class DwellHandler : MonoBehaviour, IMixedRealityFocusHandler, MonoBehaviour

    Fields

    CurrentDwellState

    Captures the dwell status

    Declaration
    protected DwellHandler.DwellStateType CurrentDwellState
    Field Value
    Type Description
    DwellHandler.DwellStateType

    CurrentDwellState

    Captures the dwell status

    Declaration
    protected DwellHandler.DwellStateType CurrentDwellState
    Field Value
    Type Description
    DwellHandler.DwellStateType

    dwellProfile

    Declaration
    protected DwellProfile dwellProfile
    Field Value
    Type Description
    DwellProfile

    dwellProfile

    Declaration
    protected DwellProfile dwellProfile
    Field Value
    Type Description
    DwellProfile

    FillTimer

    Abstracted value for the how long the dwelled object still needs to be focused to complete the dwell action Value ranges from 0 to "TimeToCompleteDwell" setting in the dwellprofile. This picks up the same unit as TimeToCompleteDwell

    Declaration
    protected float FillTimer
    Field Value
    Type Description
    Single

    FillTimer

    Abstracted value for the how long the dwelled object still needs to be focused to complete the dwell action Value ranges from 0 to "TimeToCompleteDwell" setting in the dwellprofile. This picks up the same unit as TimeToCompleteDwell

    Declaration
    protected float FillTimer
    Field Value
    Type Description
    Single

    Properties

    DwellProgress

    Property exposing the computation for what percentage of dwell has progressed.

    Declaration
    public virtual float DwellProgress { get; }
    Property Value
    Type Description
    Single

    DwellProgress

    Property exposing the computation for what percentage of dwell has progressed.

    Declaration
    public virtual float DwellProgress { get; }
    Property Value
    Type Description
    Single

    HasFocus

    Exposes whether the target has focus from the pointer type defined in dwell profile settings

    Declaration
    protected bool HasFocus { get; }
    Property Value
    Type Description
    Boolean

    HasFocus

    Exposes whether the target has focus from the pointer type defined in dwell profile settings

    Declaration
    protected bool HasFocus { get; }
    Property Value
    Type Description
    Boolean

    Methods

    CancelDwell()

    Method that can be invoked if external factors (e.g. alternate input modality preemptively invoked the target) force the dwell action to prematurely end

    Declaration
    public virtual void CancelDwell()

    CancelDwell()

    Method that can be invoked if external factors (e.g. alternate input modality preemptively invoked the target) force the dwell action to prematurely end

    Declaration
    public virtual void CancelDwell()

    OnFocusEnter(FocusEventData)

    Declaration
    public void OnFocusEnter(FocusEventData eventData)
    Parameters
    Type Name Description
    FocusEventData eventData

    OnFocusEnter(FocusEventData)

    Declaration
    public void OnFocusEnter(FocusEventData eventData)
    Parameters
    Type Name Description
    FocusEventData eventData

    OnFocusExit(FocusEventData)

    Declaration
    public void OnFocusExit(FocusEventData eventData)
    Parameters
    Type Name Description
    FocusEventData eventData

    OnFocusExit(FocusEventData)

    Declaration
    public void OnFocusExit(FocusEventData eventData)
    Parameters
    Type Name Description
    FocusEventData eventData

    UpdateFillTimer()

    Default FillTimer computation based on profile settings

    Declaration
    protected virtual void UpdateFillTimer()

    UpdateFillTimer()

    Default FillTimer computation based on profile settings

    Declaration
    protected virtual void UpdateFillTimer()

    Implements

    IMixedRealityFocusHandler
    MonoBehaviour
    In This Article
    • Fields
      • CurrentDwellState
      • CurrentDwellState
      • dwellProfile
      • dwellProfile
      • FillTimer
      • FillTimer
    • Properties
      • DwellProgress
      • DwellProgress
      • HasFocus
      • HasFocus
    • Methods
      • CancelDwell()
      • CancelDwell()
      • OnFocusEnter(FocusEventData)
      • OnFocusEnter(FocusEventData)
      • OnFocusExit(FocusEventData)
      • OnFocusExit(FocusEventData)
      • UpdateFillTimer()
      • UpdateFillTimer()
    • Implements
    Back to top Generated by DocFX