Class PointerBehaviorControls
Utility class to control PointerBehavior of pointers. Hook up buttons to the public functions to turn rays on and off.
Implements
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 AlwaysOffDeclaration
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 AlwaysOffDeclaration
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 AlwaysOffDeclaration
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 AlwaysOffDeclaration
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 AlwaysOffDeclaration
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 AlwaysOffDeclaration
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 AlwaysOffDeclaration
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 AlwaysOffDeclaration
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 AlwaysOffDeclaration
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 AlwaysOffDeclaration
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 |