Class ReceiverBaseMonoBehavior
A base class for detecting hand handling state changes from an Interactable Extend this class to build new events or receivers from Interactables
InteractableReceiver or InteractableReceiverList can be used with ReceiverBase - built-in receivers
Implements
Namespace: Microsoft.MixedReality.Toolkit.UI
Assembly: cs.temp.dll.dll
Syntax
public class ReceiverBaseMonoBehavior : MonoBehaviour, IInteractableHandler
Fields
Interactable
Interactable to target
Declaration
public Interactable Interactable
Field Value
Type | Description |
---|---|
Interactable |
InteractableSearchScope
directions to search for Interactable component in transform heirachy if none assigned
Declaration
public ReceiverBaseMonoBehavior.SearchScopes InteractableSearchScope
Field Value
Type | Description |
---|---|
ReceiverBaseMonoBehavior.SearchScopes |
lastState
Declaration
protected State lastState
Field Value
Type | Description |
---|---|
State |
Methods
AddInteractable(Interactable)
Add an interactable and add it as a handler
Declaration
public void AddInteractable(Interactable interactable)
Parameters
Type | Name | Description |
---|---|---|
Interactable | interactable |
OnClick(InteractableStates, Interactable, IMixedRealityPointer)
A click event happened
Declaration
public virtual void OnClick(InteractableStates state, Interactable source, IMixedRealityPointer pointer = null)
Parameters
Type | Name | Description |
---|---|---|
InteractableStates | state | |
Interactable | source | |
IMixedRealityPointer | pointer |
OnDisable()
Remove itself as a handler
Declaration
protected virtual void OnDisable()
OnEnable()
look for an Interactable if not assigned
Declaration
protected virtual void OnEnable()
OnStateChange(InteractableStates, Interactable)
a state has changed
Declaration
public virtual void OnStateChange(InteractableStates state, Interactable source)
Parameters
Type | Name | Description |
---|---|---|
InteractableStates | state | |
Interactable | source |
OnVoiceCommand(InteractableStates, Interactable, String, Int32, Int32)
A voice command was called
Declaration
public virtual void OnVoiceCommand(InteractableStates state, Interactable source, string command, int index = 0, int length = 1)
Parameters
Type | Name | Description |
---|---|---|
InteractableStates | state | |
Interactable | source | |
String | command | |
Int32 | index | |
Int32 | length |
Update()
Declaration
protected virtual void Update()