Class DwellHandler
Use this component to add a Dwell modality (https://docs.microsoft.com/windows/mixed-reality/gaze-and-dwell) to the UI target.
Implements
Namespace: Microsoft.MixedReality.Toolkit.Experimental.Dwell
Assembly: cs.temp.dll.dll
Syntax
public class DwellHandler : MonoBehaviour, IMixedRealityFocusHandler
Fields
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 |
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 |
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()
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 |
UpdateFillTimer()
Default FillTimer computation based on profile settings
Declaration
protected virtual void UpdateFillTimer()