Class ARBaseGestureInteractable
Base class that manipulates an object via a gesture.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.AR
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public abstract class ARBaseGestureInteractable : XRBaseInteractable, IXRActivateInteractable, IXRHoverInteractable, IXRSelectInteractable, IXRFocusInteractable, IXRInteractionStrengthInteractable, IXRInteractable, IXROverridesGazeAutoSelect
Properties
excludeUITouches
When true, will exclude touches that are over UI. Used to make screen space canvas elements block touches from hitting planes behind it.
Declaration
public bool excludeUITouches { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
gestureInteractor
The ARGesture
Declaration
protected ARGestureInteractor gestureInteractor { get; }
Property Value
Type | Description |
---|---|
ARGesture |
See Also
xrOrigin
The Unity.
Declaration
public XROrigin xrOrigin { get; set; }
Property Value
Type | Description |
---|---|
XROrigin |
Methods
Awake()
See Mono
Declaration
protected override void Awake()
Overrides
CanStartManipulationForGesture(DragGesture)
Determines if the manipulation can start for the given gesture.
Declaration
protected virtual bool CanStartManipulationForGesture(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Drag |
gesture | The current gesture. |
Returns
CanStartManipulationForGesture(PinchGesture)
Determines if the manipulation can start for the given gesture.
Declaration
protected virtual bool CanStartManipulationForGesture(PinchGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Pinch |
gesture | The current gesture. |
Returns
CanStartManipulationForGesture(TapGesture)
Determines if the manipulation can start for the given gesture.
Declaration
protected virtual bool CanStartManipulationForGesture(TapGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Tap |
gesture | The current gesture. |
Returns
CanStartManipulationForGesture(TwistGesture)
Determines if the manipulation can start for the given gesture.
Declaration
protected virtual bool CanStartManipulationForGesture(TwistGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Twist |
gesture | The current gesture. |
Returns
CanStartManipulationForGesture(TwoFingerDragGesture)
Determines if the manipulation can start for the given gesture.
Declaration
protected virtual bool CanStartManipulationForGesture(TwoFingerDragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Two |
gesture | The current gesture. |
Returns
ConnectGestureInteractor()
Connect an ARGesture
Declaration
protected virtual void ConnectGestureInteractor()
DisconnectGestureInteractor()
Disconnect an ARGesture
Declaration
protected virtual void DisconnectGestureInteractor()
IsGameObjectSelected()
Determines if the ARGesture
Declaration
protected virtual bool IsGameObjectSelected()
Returns
Type | Description |
---|---|
bool | Returns |
IsHoverableBy(IXRHoverInteractor)
Determines if a given Interactor can hover over this Interactable.
Declaration
public override bool IsHoverableBy(IXRHoverInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
IXRHover |
interactor | Interactor to check for a valid hover state with. |
Returns
Overrides
See Also
IsSelectableBy(IXRSelectInteractor)
Determines if a given Interactor can select this Interactable.
Declaration
public override bool IsSelectableBy(IXRSelectInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
IXRSelect |
interactor | Interactor to check for a valid selection with. |
Returns
Overrides
See Also
OnContinueManipulation(DragGesture)
Unity calls this method automatically when the manipulation continues.
Declaration
protected virtual void OnContinueManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Drag |
gesture | The current gesture. |
See Also
OnContinueManipulation(PinchGesture)
Unity calls this method automatically when the manipulation continues.
Declaration
protected virtual void OnContinueManipulation(PinchGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Pinch |
gesture | The current gesture. |
See Also
OnContinueManipulation(TapGesture)
Unity calls this method automatically when the manipulation continues.
Declaration
protected virtual void OnContinueManipulation(TapGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Tap |
gesture | The current gesture. |
See Also
OnContinueManipulation(TwistGesture)
Unity calls this method automatically when the manipulation continues.
Declaration
protected virtual void OnContinueManipulation(TwistGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Twist |
gesture | The current gesture. |
See Also
OnContinueManipulation(TwoFingerDragGesture)
Unity calls this method automatically when the manipulation continues.
Declaration
protected virtual void OnContinueManipulation(TwoFingerDragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Two |
gesture | The current gesture. |
See Also
OnEnable()
See Mono
Declaration
protected override void OnEnable()
Overrides
OnEndManipulation(DragGesture)
Unity calls this method automatically when the manipulation ends.
Declaration
protected virtual void OnEndManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Drag |
gesture | The current gesture. |
See Also
OnEndManipulation(PinchGesture)
Unity calls this method automatically when the manipulation ends.
Declaration
protected virtual void OnEndManipulation(PinchGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Pinch |
gesture | The current gesture. |
See Also
OnEndManipulation(TapGesture)
Unity calls this method automatically when the manipulation ends.
Declaration
protected virtual void OnEndManipulation(TapGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Tap |
gesture | The current gesture. |
See Also
OnEndManipulation(TwistGesture)
Unity calls this method automatically when the manipulation ends.
Declaration
protected virtual void OnEndManipulation(TwistGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Twist |
gesture | The current gesture. |
See Also
OnEndManipulation(TwoFingerDragGesture)
Unity calls this method automatically when the manipulation ends.
Declaration
protected virtual void OnEndManipulation(TwoFingerDragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Two |
gesture | The current gesture. |
See Also
OnRegistered(InteractableRegisteredEventArgs)
The XRInteraction
Declaration
protected override void OnRegistered(InteractableRegisteredEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Interactable |
args | Event data containing the Interaction Manager that registered this Interactable. |
Overrides
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnStartManipulation(DragGesture)
Unity calls this method automatically when the manipulation starts.
Declaration
protected virtual void OnStartManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Drag |
gesture | The current gesture. |
See Also
OnStartManipulation(PinchGesture)
Unity calls this method automatically when the manipulation starts.
Declaration
protected virtual void OnStartManipulation(PinchGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Pinch |
gesture | The current gesture. |
See Also
OnStartManipulation(TapGesture)
Unity calls this method automatically when the manipulation starts.
Declaration
protected virtual void OnStartManipulation(TapGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Tap |
gesture | The current gesture. |
See Also
OnStartManipulation(TwistGesture)
Unity calls this method automatically when the manipulation starts.
Declaration
protected virtual void OnStartManipulation(TwistGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Twist |
gesture | The current gesture. |
See Also
OnStartManipulation(TwoFingerDragGesture)
Unity calls this method automatically when the manipulation starts.
Declaration
protected virtual void OnStartManipulation(TwoFingerDragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Two |
gesture | The current gesture. |
See Also
OnUnregistered(InteractableUnregisteredEventArgs)
The XRInteraction
Declaration
protected override void OnUnregistered(InteractableUnregisteredEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Interactable |
args | Event data containing the Interaction Manager that unregistered this Interactable. |
Overrides
Remarks
args
is only valid during this method call, do not hold a reference to it.