編輯

共用方式為


BaseFocusHandler Class

Definition

Base Component for handling Focus on GameObjects.

public ref class BaseFocusHandler abstract : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::Input::IMixedRealityFocusChangedHandler, Microsoft::MixedReality::Toolkit::Input::IMixedRealityFocusHandler, UnityEngine::EventSystems::IEventSystemHandler
[UnityEngine.RequireComponent(typeof(UnityEngine.Collider))]
public abstract class BaseFocusHandler : UnityEngine.MonoBehaviour, Microsoft.MixedReality.Toolkit.Input.IMixedRealityFocusChangedHandler, Microsoft.MixedReality.Toolkit.Input.IMixedRealityFocusHandler, UnityEngine.EventSystems.IEventSystemHandler
[<UnityEngine.RequireComponent(typeof(UnityEngine.Collider))>]
type BaseFocusHandler = class
    inherit MonoBehaviour
    interface IMixedRealityFocusHandler
    interface IEventSystemHandler
    interface IMixedRealityFocusChangedHandler
Public MustInherit Class BaseFocusHandler
Inherits MonoBehaviour
Implements IEventSystemHandler, IMixedRealityFocusChangedHandler, IMixedRealityFocusHandler
Inheritance
UnityEngine.MonoBehaviour
BaseFocusHandler
Derived
Attributes
UnityEngine.RequireComponentAttribute
Implements
IMixedRealityFocusChangedHandler IMixedRealityFocusHandler UnityEngine.EventSystems.IEventSystemHandler

Constructors

BaseFocusHandler()

Properties

FocusEnabled

Is focus enabled for this Component?

Focusers

The list of IMixedRealityPointers that are currently focused on this GameObject

HasFocus

Does this object currently have focus by any IMixedRealityPointer?

Methods

OnBeforeFocusChange(FocusEventData)

Focus event that is raised before the focus is actually changed.

OnFocusChanged(FocusEventData)

Focus event that is raised when the focused object is changed.

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