Class ARGestureInteractor
The ARGesture
Implements
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.AR
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("XR/AR Gesture Interactor", 22)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.6/api/UnityEngine.XR.Interaction.Toolkit.AR.ARGestureInteractor.html")]
public class ARGestureInteractor : XRBaseInteractor, IXRHoverInteractor, IXRSelectInteractor, IXRTargetPriorityInteractor, IXRGroupMember, IXRInteractionStrengthInteractor, IXRInteractor
Remarks
To make use of this, add an ARGesture
Properties
dragGestureRecognizer
(Read Only) The Drag gesture recognizer.
Declaration
public DragGestureRecognizer dragGestureRecognizer { get; }
Property Value
Type | Description |
---|---|
Drag |
pinchGestureRecognizer
(Read Only) The Pinch gesture recognizer.
Declaration
public PinchGestureRecognizer pinchGestureRecognizer { get; }
Property Value
Type | Description |
---|---|
Pinch |
raycastMask
Gets or sets layer mask used for limiting ray cast targets.
Declaration
public LayerMask raycastMask { get; set; }
Property Value
Type | Description |
---|---|
Layer |
raycastTriggerInteraction
Gets or sets type of interaction with trigger colliders via ray cast.
Declaration
public QueryTriggerInteraction raycastTriggerInteraction { get; set; }
Property Value
Type | Description |
---|---|
Query |
tapGestureRecognizer
(Read Only) The Tap gesture recognizer.
Declaration
public TapGestureRecognizer tapGestureRecognizer { get; }
Property Value
Type | Description |
---|---|
Tap |
twistGestureRecognizer
(Read Only) The Twist gesture recognizer.
Declaration
public TwistGestureRecognizer twistGestureRecognizer { get; }
Property Value
Type | Description |
---|---|
Twist |
twoFingerDragGestureRecognizer
(Read Only) The two-finger Drag gesture recognizer.
Declaration
public TwoFingerDragGestureRecognizer twoFingerDragGestureRecognizer { get; }
Property Value
Type | Description |
---|---|
Two |
xrOrigin
The XROrigin that this Interactor will use (such as to get the Camera or to transform from Session space). Will find one if null.
Declaration
public XROrigin xrOrigin { get; set; }
Property Value
Type | Description |
---|---|
XROrigin |
Methods
Awake()
See Mono
Declaration
protected override void Awake()
Overrides
GetValidTargets(List<IXRInteractable>)
Retrieve the list of Interactables that this Interactor could possibly interact with this frame. This list is sorted by priority (with highest priority first).
Declaration
public override void GetValidTargets(List<IXRInteractable> validTargets)
Parameters
Type | Name | Description |
---|---|---|
List<IXRInteractable> | validTargets |
Overrides
Remarks
When implementing this method, Unity expects you to clear targets
before adding to it.
OnDisable()
See Mono
Declaration
protected override void OnDisable()
Overrides
OnEnable()
See Mono
Declaration
protected override void OnEnable()
Overrides
OnRegistered(InteractorRegisteredEventArgs)
The XRInteraction
Declaration
protected override void OnRegistered(InteractorRegisteredEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Interactor |
args | Event data containing the Interaction Manager that registered this Interactor. |
Overrides
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnUnregistered(InteractorUnregisteredEventArgs)
The XRInteraction
Declaration
protected override void OnUnregistered(InteractorUnregisteredEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Interactor |
args | Event data containing the Interaction Manager that unregistered this Interactor. |
Overrides
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
ProcessInteractor(UpdatePhase)
The XRInteraction
Declaration
public override void ProcessInteractor(XRInteractionUpdateOrder.UpdatePhase updatePhase)
Parameters
Type | Name | Description |
---|---|---|
XRInteraction |
updatePhase | The update phase this is called during. |
Overrides
Remarks
Please see the XRInteraction
See Also
PushRaycastLayerMask()
Passes raycast layer mask properties to the Gesture Recognizers.
Declaration
protected virtual void PushRaycastLayerMask()
See Also
PushRaycastTriggerInteraction()
Passes raycast trigger interaction properties to the Gesture Recognizers.
Declaration
protected virtual void PushRaycastTriggerInteraction()
See Also
PushXROrigin()
Passes the xr
Declaration
protected virtual void PushXROrigin()
See Also
UpdateGestureRecognizers()
Update all Gesture Recognizers.
Declaration
protected virtual void UpdateGestureRecognizers()