日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    Show / Hide Table of Contents

    Class ReceiverBase

    The base class for all receivers that attach to Interactables

    Inheritance
    Object
    ReceiverBase
    CustomInteractablesReceiver
    InteractableAudioReceiver
    InteractableOnClickReceiver
    InteractableOnFocusReceiver
    InteractableOnGrabReceiver
    InteractableOnHoldReceiver
    InteractableOnPressReceiver
    InteractableOnToggleReceiver
    InteractableOnTouchReceiver
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.UI
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class ReceiverBase

    Constructors

    ReceiverBase(UnityEvent, String)

    Constructs an interaction receiver that will raise unity event when triggered.

    Declaration
    protected ReceiverBase(UnityEvent ev, string name)
    Parameters
    Type Name Description
    UnityEvent ev

    Unity event to invoke. Add more events in deriving class.

    String name

    Name of the unity event that will get invoked (visible in editor).

    Fields

    uEvent

    Declaration
    protected UnityEvent uEvent
    Field Value
    Type Description
    UnityEvent

    Properties

    Event

    Each Receiver has a base Event it raises, (in addition to others).

    Declaration
    public UnityEvent Event { get; set; }
    Property Value
    Type Description
    UnityEvent

    HideUnityEvents

    Defines whether Unity Events should be hidden in inspector for this type of EventReceiver

    Declaration
    public virtual bool HideUnityEvents { get; }
    Property Value
    Type Description
    Boolean

    Host

    Targeted component for Event Receiver at runtime

    Declaration
    public MonoBehaviour Host { get; set; }
    Property Value
    Type Description
    MonoBehaviour

    Name

    Name of Event Receiver

    Declaration
    public string Name { get; protected set; }
    Property Value
    Type Description
    String

    Methods

    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

    OnUpdate(InteractableStates, Interactable)

    The state has changed

    Declaration
    public abstract void OnUpdate(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
    Back to top Generated by DocFX