InteractionDetector Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Basic implementation of a IInteractionModeDetector, which reports the specified hover and select modes whenever the associated interactor has a valid hover or select target.
[UnityEngine.AddComponentMenu("MRTK/Input/Interaction Detector")]
public class InteractionDetector : UnityEngine.MonoBehaviour, MixedReality.Toolkit.Input.IInteractionModeDetector
[<UnityEngine.AddComponentMenu("MRTK/Input/Interaction Detector")>]
type InteractionDetector = class
inherit MonoBehaviour
interface IInteractionModeDetector
Public Class InteractionDetector
Inherits MonoBehaviour
Implements IInteractionModeDetector
- Inheritance
-
UnityEngine.MonoBehaviourInteractionDetector
- Attributes
-
UnityEngine.AddComponentMenuAttribute
- Implements
Constructors
| Name | Description |
|---|---|
| InteractionDetector() | |
Properties
| Name | Description |
|---|---|
| DetectHover |
Should this detector set a mode when the specified interactor has a hover target? |
| DetectSelect |
Should this detector set a mode when the specified interactor has a selection? |
| Interactor |
The interactor to listen to. |
| ModeOnDetection |
The interaction mode to be toggled if when the detector detects the appropriate game state |
| ModeOnHover |
The interaction mode to be set when the interactor is hovering over an interactable. |
| ModeOnSelect |
The interaction mode to be set when the interactor is selecting an interactable. |
Methods
| Name | Description |
|---|---|
| GetControllers() |
Get a list of the UnityEngine.GameObject instances which represent the controllers that this interaction mode detector has jurisdiction over. |
| IsModeDetected() |
Determine whether the detector has detected the appropriate conditions. |