Bearbeiten

Freigeben über


InteractableReceiver Class

Definition

Example of building an event system for Interactable that still uses ReceiverBase events

public ref class InteractableReceiver : Microsoft::MixedReality::Toolkit::UI::ReceiverBaseMonoBehavior
[UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/InteractableReceiver")]
public class InteractableReceiver : Microsoft.MixedReality.Toolkit.UI.ReceiverBaseMonoBehavior
[<UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/InteractableReceiver")>]
type InteractableReceiver = class
    inherit ReceiverBaseMonoBehavior
Public Class InteractableReceiver
Inherits ReceiverBaseMonoBehavior
Inheritance
UnityEngine.MonoBehaviour
InteractableReceiver
Attributes
UnityEngine.AddComponentMenuAttribute

Constructors

InteractableReceiver()

Fields

Events
Interactable

Interactable to target

(Inherited from ReceiverBaseMonoBehavior)
InteractableSearchScope

directions to search for Interactable component in transform hierarchy if none assigned

(Inherited from ReceiverBaseMonoBehavior)
lastState (Inherited from ReceiverBaseMonoBehavior)

Methods

AddInteractable(Interactable)

Add an interactable and add it as a handler

(Inherited from ReceiverBaseMonoBehavior)
Awake()
OnClick(InteractableStates, Interactable, IMixedRealityPointer)

click happened

OnDisable()

Remove itself as a handler

(Inherited from ReceiverBaseMonoBehavior)
OnEnable()

look for an Interactable if not assigned

(Inherited from ReceiverBaseMonoBehavior)
OnStateChange(InteractableStates, Interactable)

A state has changed

OnVoiceCommand(InteractableStates, Interactable, String, Int32, Int32)

voice command happened

SetupEvents()

set up only one event

Update() (Inherited from ReceiverBaseMonoBehavior)

Applies to