Modifica

Condividi tramite


EyeTrackingTarget Class

Definition

A game object with the "EyeTrackingTarget" script attached reacts to being looked at independent of other available inputs.

public ref class EyeTrackingTarget : Microsoft::MixedReality::Toolkit::Input::InputSystemGlobalHandlerListener, Microsoft::MixedReality::Toolkit::Input::IMixedRealityPointerHandler, Microsoft::MixedReality::Toolkit::Input::IMixedRealitySpeechHandler, UnityEngine::EventSystems::IEventSystemHandler
[UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/EyeTrackingTarget")]
public class EyeTrackingTarget : Microsoft.MixedReality.Toolkit.Input.InputSystemGlobalHandlerListener, Microsoft.MixedReality.Toolkit.Input.IMixedRealityPointerHandler, Microsoft.MixedReality.Toolkit.Input.IMixedRealitySpeechHandler, UnityEngine.EventSystems.IEventSystemHandler
[<UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/EyeTrackingTarget")>]
type EyeTrackingTarget = class
    inherit InputSystemGlobalHandlerListener
    interface IMixedRealityPointerHandler
    interface IEventSystemHandler
    interface IMixedRealitySpeechHandler
    interface IMixedRealityBaseInputHandler
Public Class EyeTrackingTarget
Inherits InputSystemGlobalHandlerListener
Implements IEventSystemHandler, IMixedRealityPointerHandler, IMixedRealitySpeechHandler
Inheritance
UnityEngine.MonoBehaviour
EyeTrackingTarget
Attributes
UnityEngine.AddComponentMenuAttribute
Implements

Constructors

EyeTrackingTarget()

Properties

EyeCursorSnapToTargetCenter

If true, the eye cursor (if enabled) will snap to the center of this object.

IsDwelledOn

Returns true if the user has been looking at the target for a certain amount of time specified by dwellTimeInSec.

IsLookedAt

Returns true if the user looks at the target or more specifically when the eye gaze ray intersects with the target's bounding box.

LookedAtEyeTarget

EyeTrackingTarget eye gaze is currently looking at. null if currently gazed at object has no EyeTrackingTarget, or if no object with collider is being looked at.

LookedAtPoint

The point in space where the eye gaze hit. set to the origin if the EyeGazeProvider is not currently enabled

LookedAtTarget

GameObject eye gaze is currently targeting, updated once per frame. null if no object with collider is currently being looked at.

OnDwell

Event is triggered when the target has been looked at for a given predefined duration (dwellTimeInSec).

OnLookAtStart

Event is triggered when the user starts to look at the target.

OnLookAway

Event to be triggered when the user is looking away from the target.

OnSelected

Event is triggered when the looked at target is selected.

OnTapDown

Event is triggered when the RaiseEventManually_TapDown is called.

OnTapUp

Event is triggered when the RaiseEventManually_TapUp is called.

SelectedTarget

Most recently selected target, selected either using pointer or voice.

WhileLookingAtTarget

Event is triggered when the user continues to look at the target.

Methods

EnsureInputSystemValid()

A task that will only complete when the input system has in a valid state.

(Inherited from InputSystemGlobalHandlerListener)
OnDisable()
OnEnable() (Inherited from InputSystemGlobalHandlerListener)
OnEyeFocusDwell()
OnEyeFocusStart()
OnEyeFocusStay()
OnEyeFocusStop()
RaiseSelectEventManually()
RegisterHandlers()

Overload this method to specify, which global events component wants to listen to. Use RegisterHandler API of InputSystem

Start()
UnregisterHandlers()

Overload this method to specify, which global events component should stop listening to. Use UnregisterHandler API of InputSystem

Explicit Interface Implementations

IMixedRealityPointerHandler.OnPointerClicked(MixedRealityPointerEventData)
IMixedRealityPointerHandler.OnPointerDown(MixedRealityPointerEventData)
IMixedRealityPointerHandler.OnPointerDragged(MixedRealityPointerEventData)
IMixedRealityPointerHandler.OnPointerUp(MixedRealityPointerEventData)
IMixedRealitySpeechHandler.OnSpeechKeywordRecognized(SpeechEventData)

Applies to