Class TouchscreenHoverFilter
Hover filter that checks if the screen is being touched. Can be used with the ray interactor to prevent hover interactions when the screen is not being touched.
Implements
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit.Filtering
Assembly: solution.dll
Syntax
[AddComponentMenu("XR/AR/Touchscreen Hover Filter", 11)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Filtering.TouchscreenHoverFilter.html")]
public class TouchscreenHoverFilter : MonoBehaviour, IXRHoverFilter
Properties
| Name | Description |
|---|---|
| canProcess | Whether this hover filter can process interactions. Hover filters that can process interactions receive calls to Process(IXRHoverInteractor, IXRHoverInteractable), hover filters that cannot process do not. |
| screenTouchCountInput | The input used to read the screen touch count value. |
Methods
| Name | Description |
|---|---|
| OnDisable() | See MonoBehaviour. |
| OnEnable() | See MonoBehaviour. |
| Process(IXRHoverInteractor, IXRHoverInteractable) | Called by the host object (XRInteractionManager, XRBaseInteractor or XRBaseInteractable) to verify if the hover interaction between the given Interactor and Interactable can be performed. |