ProximityDetector 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.
An IInteractionModeDetector that detects nearby interactables.
[UnityEngine.AddComponentMenu("MRTK/Input/Proximity Detector")]
public class ProximityDetector : UnityEngine.MonoBehaviour, MixedReality.Toolkit.Input.IInteractionModeDetector
[<UnityEngine.AddComponentMenu("MRTK/Input/Proximity Detector")>]
type ProximityDetector = class
inherit MonoBehaviour
interface IInteractionModeDetector
Public Class ProximityDetector
Inherits MonoBehaviour
Implements IInteractionModeDetector
- Inheritance
-
UnityEngine.MonoBehaviourProximityDetector
- Derived
- Attributes
-
UnityEngine.AddComponentMenuAttribute
- Implements
Constructors
| Name | Description |
|---|---|
| ProximityDetector() | |
Properties
| Name | Description |
|---|---|
| DetectedColliders |
A collection of colliders currently detected by this proximity detector. Only colliders associated with IXRInteractables are included. |
| InteractionManager |
The interaction manager to use to query interactors and their registration events. Currently protected internal, may be exposed in a future update. |
| ModeOnDetection |
The interaction mode to be toggled if when the detector detects the appropriate game state |
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. |