FocusHandler Class

Definition

Utility component to hook up Unity events to the OnFocusEnter and OnFocusExit events.

C++
public ref class FocusHandler : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::Input::IMixedRealityFocusHandler, UnityEngine::EventSystems::IEventSystemHandler
Inheritance
UnityEngine.MonoBehaviour
FocusHandler
Attributes
UnityEngine.AddComponentMenuAttribute
Implements
IMixedRealityFocusHandler UnityEngine.EventSystems.IEventSystemHandler

Constructors

Properties

MarkEventsAsUsed

Whether input events should be marked as used after handling so other handlers in the same game object ignore them.

OnFocusEnterEvent

Event which is triggered when focus begins.

OnFocusExitEvent

Event which is triggered when focus ends.

Methods

OnFocusEnter(FocusEventData)

The Focus Enter event is raised on this GameObject whenever a IMixedRealityPointer's focus enters this GameObject's Collider.

OnFocusExit(FocusEventData)

The Focus Exit event is raised on this GameObject whenever a IMixedRealityPointer's focus leaves this GameObject's Collider.

Applies to

Produit Versions
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0