Class InteractableReceiver
Example of building an event system for Interactable that still uses ReceiverBase events
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.UI
Assembly: cs.temp.dll.dll
Syntax
public class InteractableReceiver : ReceiverBaseMonoBehavior, IInteractableHandler, MonoBehaviour
Fields
Events
Declaration
public List<InteractableEvent> Events
Field Value
Type | Description |
---|---|
List<InteractableEvent> |
Events
Declaration
public List<InteractableEvent> Events
Field Value
Type | Description |
---|---|
List<InteractableEvent> |
Methods
Awake()
Declaration
protected virtual void Awake()
Awake()
Declaration
protected virtual void Awake()
OnClick(InteractableStates, Interactable, IMixedRealityPointer)
click happened
Declaration
public override void OnClick(InteractableStates state, Interactable source, IMixedRealityPointer pointer = null)
Parameters
Type | Name | Description |
---|---|---|
InteractableStates | state | |
Interactable | source | |
IMixedRealityPointer | pointer |
Overrides
OnClick(InteractableStates, Interactable, IMixedRealityPointer)
click happened
Declaration
public override void OnClick(InteractableStates state, Interactable source, IMixedRealityPointer pointer = null)
Parameters
Type | Name | Description |
---|---|---|
InteractableStates | state | |
Interactable | source | |
IMixedRealityPointer | pointer |
Overrides
OnStateChange(InteractableStates, Interactable)
A state has changed
Declaration
public override void OnStateChange(InteractableStates state, Interactable source)
Parameters
Type | Name | Description |
---|---|---|
InteractableStates | state | |
Interactable | source |
Overrides
OnStateChange(InteractableStates, Interactable)
A state has changed
Declaration
public override void OnStateChange(InteractableStates state, Interactable source)
Parameters
Type | Name | Description |
---|---|---|
InteractableStates | state | |
Interactable | source |
Overrides
OnVoiceCommand(InteractableStates, Interactable, String, Int32, Int32)
voice command happened
Declaration
public override 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 |
Overrides
OnVoiceCommand(InteractableStates, Interactable, String, Int32, Int32)
voice command happened
Declaration
public override 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 |
Overrides
SetupEvents()
set up only one event
Declaration
protected virtual void SetupEvents()
SetupEvents()
set up only one event
Declaration
protected virtual void SetupEvents()
Implements
MonoBehaviour