Class BaseFocusHandler
Base Component for handling Focus on GameObjects.
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
public abstract class BaseFocusHandler : MonoBehaviour, IMixedRealityFocusHandler, IMixedRealityFocusChangedHandler, IEventSystemHandler
Properties
FocusEnabled
Is focus enabled for this Component?
Declaration
public virtual bool FocusEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Focusers
The list of IMixedRealityPointers that are currently focused on this GameObject
Declaration
public List<IMixedRealityPointer> Focusers { get; }
Property Value
Type | Description |
---|---|
List<IMixedRealityPointer> |
HasFocus
Does this object currently have focus by any IMixedRealityPointer?
Declaration
public virtual bool HasFocus { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
OnBeforeFocusChange(FocusEventData)
Focus event that is raised before the focus is actually changed.
Declaration
public virtual void OnBeforeFocusChange(FocusEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
FocusEventData | eventData |
Remarks
Useful for logic that needs to take place before focus changes.
OnFocusChanged(FocusEventData)
Focus event that is raised when the focused object is changed.
Declaration
public virtual void OnFocusChanged(FocusEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
FocusEventData | eventData |
OnFocusEnter(FocusEventData)
The Focus Enter event is raised on this GameObject whenever a IMixedRealityPointer's focus enters this GameObject's Collider.
Declaration
public virtual void OnFocusEnter(FocusEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
FocusEventData | eventData |
OnFocusExit(FocusEventData)
The Focus Exit event is raised on this GameObject whenever a IMixedRealityPointer's focus leaves this GameObject's Collider.
Declaration
public virtual void OnFocusExit(FocusEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
FocusEventData | eventData |