Class XRHoverFilterDelegate
A hover filter that forwards its processing to a delegate (delegate
Implements
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.Filtering
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public sealed class XRHoverFilterDelegate : IXRHoverFilter
Constructors
XRHoverFilterDelegate(Func<IXRHoverInteractor, IXRHoverInteractable, bool>)
Creates a new hover filter delegate.
Declaration
public XRHoverFilterDelegate(Func<IXRHoverInteractor, IXRHoverInteractable, bool> delegateToProcess)
Parameters
Type | Name | Description |
---|---|---|
Func<IXRHover |
delegateToProcess | The delegate to be invoked when processing this filter. |
See Also
Properties
canProcess
Whether this hover filter can process interactions.
Hover filters that can process interactions receive calls to Process(IXRHover
Declaration
public bool canProcess { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
It's recommended to return is
See Also
delegateToProcess
The delegate to be invoked when processing this filter.
Declaration
public Func<IXRHoverInteractor, IXRHoverInteractable, bool> delegateToProcess { get; set; }
Property Value
Type | Description |
---|---|
Func<IXRHover |
See Also
Methods
Process(IXRHoverInteractor, IXRHoverInteractable)
Called by the host object (XRInteraction
Declaration
public bool Process(IXRHoverInteractor interactor, IXRHoverInteractable interactable)
Parameters
Type | Name | Description |
---|---|---|
IXRHover |
interactor | The Interactor to validate the hover interaction. |
IXRHover |
interactable | The Interactable to validate the hover interaction. |
Returns
Type | Description |
---|---|
bool | Returns true when the given Interactor can hover the given Interactable. Otherwise, returns false. |