Interface IMixedRealityFocusChangedHandler
Interface to implement to react to focus changed events.
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
public interface IMixedRealityFocusChangedHandler : IEventSystemHandler
Remarks
The events on this interface are related to those of IMixedRealityFocusHandler, whose event have a known ordering with this interface:
IMixedRealityFocusChangedHandler::OnBeforeFocusChange IMixedRealityFocusHandler::OnFocusEnter IMixedRealityFocusHandler::OnFocusExit IMixedRealityFocusChangedHandler::OnFocusChanged
Because these two interfaces are different, consumers must be wary about having nested hierarchies where some game objects will implement both interfaces, and more deeply nested object within the same parent-child chain that implement a single one of these - such a presence can lead to scenarios where one interface is invoked on the child object, and then the other interface is invoked on the parent object (thus, the parent would "miss" getting the event that the child had already processed).
Methods
OnBeforeFocusChange(FocusEventData)
Focus event that is raised before the focus is actually changed.
Declaration
void OnBeforeFocusChange(FocusEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
FocusEventData | eventData |
Remarks
Useful for logic that needs to take place before focus changes.
OnBeforeFocusChange(FocusEventData)
Focus event that is raised before the focus is actually changed.
Declaration
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
void OnFocusChanged(FocusEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
FocusEventData | eventData |
OnFocusChanged(FocusEventData)
Focus event that is raised when the focused object is changed.
Declaration
void OnFocusChanged(FocusEventData eventData)
Parameters
Type | Name | Description |
---|---|---|
FocusEventData | eventData |