PointerBehaviorControls Class

Definition

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

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

Constructors

PointerBehaviorControls()

Methods

SetControllerRayEnabled(Boolean)

Sets the PointerBehavior for all controller rays to be AlwaysOff

SetFingerOnly()

Sets pointer states to turn off all but the poke pointer

SetGazeEnabled(Boolean)

Sets the PointerBehavior for the gaze pointer to be AlwaysOff

SetGrabEnabled(Boolean)

Sets the PointerBehavior for the grab pointer to be AlwaysOff

SetHandRayEnabled(Boolean)

Sets the PointerBehavior for all hand rays.

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

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

SetPokeEnabled(Boolean)

Sets the PointerBehavior for the poke pointer to be AlwaysOff

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

ToggleControllerRayEnabled()

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

ToggleHandGrabEnabled()

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

ToggleHandPokeEnabled()

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

ToggleHandRayEnabled()

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

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.

Applies to