mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class PointerBehaviorControls

    Utility class to control PointerBehavior of pointers. Hook up buttons to the public functions to turn rays on and off.

    Inheritance
    Object
    PointerBehaviorControls
    Implements
    MonoBehaviour
    Namespace: Microsoft.MixedReality.Toolkit.UI
    Assembly: cs.temp.dll.dll
    Syntax
    public class PointerBehaviorControls : MonoBehaviour, MonoBehaviour

    Methods

    SetControllerRayEnabled(Boolean)

    Sets the PointerBehavior for all controller rays to be AlwaysOff

    If true, behavior will be set to Default. Otherwise it will be set to AlwaysOff
    Declaration
    public void SetControllerRayEnabled(bool isEnabled)
    Parameters
    Type Name Description
    Boolean isEnabled

    SetControllerRayEnabled(Boolean)

    Sets the PointerBehavior for all controller rays to be AlwaysOff

    If true, behavior will be set to Default. Otherwise it will be set to AlwaysOff
    Declaration
    public void SetControllerRayEnabled(bool isEnabled)
    Parameters
    Type Name Description
    Boolean isEnabled

    SetFingerOnly()

    Sets pointer states to turn off all but the poke pointer

    Declaration
    public void SetFingerOnly()

    SetFingerOnly()

    Sets pointer states to turn off all but the poke pointer

    Declaration
    public void SetFingerOnly()

    SetGazeEnabled(Boolean)

    Sets the PointerBehavior for the gaze pointer to be AlwaysOff

    If true, behavior will be set to Default. Otherwise it will be set to AlwaysOff
    Declaration
    public void SetGazeEnabled(bool isEnabled)
    Parameters
    Type Name Description
    Boolean isEnabled

    SetGazeEnabled(Boolean)

    Sets the PointerBehavior for the gaze pointer to be AlwaysOff

    If true, behavior will be set to Default. Otherwise it will be set to AlwaysOff
    Declaration
    public void SetGazeEnabled(bool isEnabled)
    Parameters
    Type Name Description
    Boolean isEnabled

    SetGrabEnabled(Boolean)

    Sets the PointerBehavior for the grab pointer to be AlwaysOff

    If true, behavior will be set to Default. Otherwise it will be set to AlwaysOff
    Declaration
    public void SetGrabEnabled(bool isEnabled)
    Parameters
    Type Name Description
    Boolean isEnabled

    SetGrabEnabled(Boolean)

    Sets the PointerBehavior for the grab pointer to be AlwaysOff

    If true, behavior will be set to Default. Otherwise it will be set to AlwaysOff
    Declaration
    public void SetGrabEnabled(bool isEnabled)
    Parameters
    Type Name Description
    Boolean isEnabled

    SetHandRayEnabled(Boolean)

    Sets the PointerBehavior for all hand rays.

    If true, behavior will be set to Default. Otherwise it will be set to AlwaysOff
    Declaration
    public void SetHandRayEnabled(bool isEnabled)
    Parameters
    Type Name Description
    Boolean isEnabled

    SetHandRayEnabled(Boolean)

    Sets the PointerBehavior for all hand rays.

    If true, behavior will be set to Default. Otherwise it will be set to AlwaysOff
    Declaration
    public void SetHandRayEnabled(bool isEnabled)
    Parameters
    Type Name Description
    Boolean isEnabled

    SetHoloLens1()

    Sets pointer behavior to mimic HoloLens 1 interactions, useful for using Hololens 1 interactions on HoloLens 2. PokePointer will be off GrabPointer will be off HandRayPointer will be off MotionControllerRayPointer will be off GazePointer will be Default

    Declaration
    public void SetHoloLens1()

    SetHoloLens1()

    Sets pointer behavior to mimic HoloLens 1 interactions, useful for using Hololens 1 interactions on HoloLens 2. PokePointer will be off GrabPointer will be off HandRayPointer will be off MotionControllerRayPointer will be off GazePointer will be Default

    Declaration
    public void SetHoloLens1()

    SetHoloLens2()

    Sets pointer behavior to mimic HoloLens 2 PokePointer will be Default GrabPointer will be Default HandRayPointer will be Default MotionControllerRayPointer will be off GazePointer will be Off

    Declaration
    public void SetHoloLens2()

    SetHoloLens2()

    Sets pointer behavior to mimic HoloLens 2 PokePointer will be Default GrabPointer will be Default HandRayPointer will be Default MotionControllerRayPointer will be off GazePointer will be Off

    Declaration
    public void SetHoloLens2()

    SetPokeEnabled(Boolean)

    Sets the PointerBehavior for the poke pointer to be AlwaysOff

    If true, behavior will be set to Default. Otherwise it will be set to AlwaysOff
    Declaration
    public void SetPokeEnabled(bool isEnabled)
    Parameters
    Type Name Description
    Boolean isEnabled

    SetPokeEnabled(Boolean)

    Sets the PointerBehavior for the poke pointer to be AlwaysOff

    If true, behavior will be set to Default. Otherwise it will be set to AlwaysOff
    Declaration
    public void SetPokeEnabled(bool isEnabled)
    Parameters
    Type Name Description
    Boolean isEnabled

    SetVR()

    Sets pointer states to mimic traditional vr behavior. PokePointer will be off GrabPointer will be off HandRayPointer will be off MotionControllerRayPointer will be Default GazePointef will be off

    Declaration
    public void SetVR()

    SetVR()

    Sets pointer states to mimic traditional vr behavior. PokePointer will be off GrabPointer will be off HandRayPointer will be off MotionControllerRayPointer will be Default GazePointef will be off

    Declaration
    public void SetVR()

    ToggleControllerRayEnabled()

    If controller ray PointerBehavior is AlwaysOn or Default, set it to off. Otherwise, set behavior to default

    Declaration
    public void ToggleControllerRayEnabled()

    ToggleControllerRayEnabled()

    If controller ray PointerBehavior is AlwaysOn or Default, set it to off. Otherwise, set behavior to default

    Declaration
    public void ToggleControllerRayEnabled()

    ToggleHandGrabEnabled()

    If hand grab pointer PointerBehavior is AlwaysOn or Default, set it to off. Otherwise, set behavior to default

    Declaration
    public void ToggleHandGrabEnabled()

    ToggleHandGrabEnabled()

    If hand grab pointer PointerBehavior is AlwaysOn or Default, set it to off. Otherwise, set behavior to default

    Declaration
    public void ToggleHandGrabEnabled()

    ToggleHandPokeEnabled()

    If finger poke pointer PointerBehavior is AlwaysOn or Default, set it to off. Otherwise, set behavior to default

    Declaration
    public void ToggleHandPokeEnabled()

    ToggleHandPokeEnabled()

    If finger poke pointer PointerBehavior is AlwaysOn or Default, set it to off. Otherwise, set behavior to default

    Declaration
    public void ToggleHandPokeEnabled()

    ToggleHandRayEnabled()

    If hand ray PointerBehavior is AlwaysOn or Default, set it to off. Otherwise, set behavior to default

    Declaration
    public void ToggleHandRayEnabled()

    ToggleHandRayEnabled()

    If hand ray PointerBehavior is AlwaysOn or Default, set it to off. Otherwise, set behavior to default

    Declaration
    public void ToggleHandRayEnabled()

    TogglePointerEnabled<T>(InputSourceType)

    Toggles a pointer's "enabled" behavior. If a pointer's PointerBehavior is Default or AlwaysOn, set it to AlwaysOff. Otherwise, set the pointer's behavior to Default. Will set this state for all matching pointers.

    Declaration
    public void TogglePointerEnabled<T>(InputSourceType inputType)
    
        where T : class, IMixedRealityPointer
    Parameters
    Type Name Description
    InputSourceType inputType

    Input type of pointer to set

    Type Parameters
    Name Description
    T

    Type of pointer to set

    TogglePointerEnabled<T>(InputSourceType)

    Toggles a pointer's "enabled" behavior. If a pointer's PointerBehavior is Default or AlwaysOn, set it to AlwaysOff. Otherwise, set the pointer's behavior to Default. Will set this state for all matching pointers.

    Declaration
    public void TogglePointerEnabled<T>(InputSourceType inputType)
    
        where T : class, IMixedRealityPointer
    Parameters
    Type Name Description
    InputSourceType inputType

    Input type of pointer to set

    Type Parameters
    Name Description
    T

    Type of pointer to set

    Implements

    MonoBehaviour
    In This Article
    • Methods
      • SetControllerRayEnabled(Boolean)
      • SetControllerRayEnabled(Boolean)
      • SetFingerOnly()
      • SetFingerOnly()
      • SetGazeEnabled(Boolean)
      • SetGazeEnabled(Boolean)
      • SetGrabEnabled(Boolean)
      • SetGrabEnabled(Boolean)
      • SetHandRayEnabled(Boolean)
      • SetHandRayEnabled(Boolean)
      • SetHoloLens1()
      • SetHoloLens1()
      • SetHoloLens2()
      • SetHoloLens2()
      • SetPokeEnabled(Boolean)
      • SetPokeEnabled(Boolean)
      • SetVR()
      • SetVR()
      • ToggleControllerRayEnabled()
      • ToggleControllerRayEnabled()
      • ToggleHandGrabEnabled()
      • ToggleHandGrabEnabled()
      • ToggleHandPokeEnabled()
      • ToggleHandPokeEnabled()
      • ToggleHandRayEnabled()
      • ToggleHandRayEnabled()
      • TogglePointerEnabled<T>(InputSourceType)
      • TogglePointerEnabled<T>(InputSourceType)
    • Implements
    Back to top Generated by DocFX