Class ARBaseGestureInteractable
Base class that manipulates an object via a gesture.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.AR
Syntax
public abstract class ARBaseGestureInteractable : XRBaseInteractable
Properties
arSessionOrigin
The
Declaration
public ARSessionOrigin arSessionOrigin { get; set; }
Property Value
Type | Description |
---|---|
ARSessionOrigin |
gestureInteractor
The ARGestureInteractor whose gestures are listened to by this Interactable when connected.
Declaration
protected ARGestureInteractor gestureInteractor { get; }
Property Value
Type | Description |
---|---|
ARGestureInteractor |
See Also
Methods
Awake()
See
Declaration
protected override void Awake()
Overrides
CanStartManipulationForGesture(DragGesture)
Determines if the manipulation can be started for the given gesture.
Declaration
protected virtual bool CanStartManipulationForGesture(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
DragGesture | gesture | The current gesture. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the manipulation can be started. Otherwise, returns false. |
CanStartManipulationForGesture(PinchGesture)
Determines if the manipulation can be started for the given gesture.
Declaration
protected virtual bool CanStartManipulationForGesture(PinchGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
PinchGesture | gesture | The current gesture. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the manipulation can be started. Otherwise, returns false. |
CanStartManipulationForGesture(TapGesture)
Determines if the manipulation can be started for the given gesture.
Declaration
protected virtual bool CanStartManipulationForGesture(TapGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TapGesture | gesture | The current gesture. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the manipulation can be started. Otherwise, returns false. |
CanStartManipulationForGesture(TwistGesture)
Determines if the manipulation can be started for the given gesture.
Declaration
protected virtual bool CanStartManipulationForGesture(TwistGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TwistGesture | gesture | The current gesture. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the manipulation can be started. Otherwise, returns false. |
CanStartManipulationForGesture(TwoFingerDragGesture)
Determines if the manipulation can be started for the given gesture.
Declaration
protected virtual bool CanStartManipulationForGesture(TwoFingerDragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TwoFingerDragGesture | gesture | The current gesture. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the manipulation can be started. Otherwise, returns false. |
ConnectGestureInteractor()
Connect an interactor's gestures to this interactable.
Declaration
protected virtual void ConnectGestureInteractor()
DisconnectGestureInteractor()
Disconnect an interactor's gestures from this interactable.
Declaration
protected virtual void DisconnectGestureInteractor()
IsGameObjectSelected()
Determines if the Gesture Interactor is selecting the
Declaration
protected virtual bool IsGameObjectSelected()
Returns
Type | Description |
---|---|
Boolean | Returns |
IsHoverableBy(XRBaseInteractor)
Determines if this interactable can be hovered by a given interactor.
Declaration
public override bool IsHoverableBy(XRBaseInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
XRBaseInteractor | interactor | Interactor to check for a valid hover state with. |
Returns
Type | Description |
---|---|
Boolean | Returns true if hovering is valid this frame. Returns false if not. |
Overrides
See Also
IsSelectableBy(XRBaseInteractor)
Determines if this interactable can be selected by a given interactor.
Declaration
public override bool IsSelectableBy(XRBaseInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
XRBaseInteractor | interactor | Interactor to check for a valid selection with. |
Returns
Type | Description |
---|---|
Boolean | Returns true if selection is valid this frame. Returns false if not. |
Overrides
See Also
OnContinueManipulation(DragGesture)
Unity calls this method automatically when the manipulation is continued.
Declaration
protected virtual void OnContinueManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
DragGesture | gesture | The current gesture. |
See Also
OnContinueManipulation(PinchGesture)
Unity calls this method automatically when the manipulation is continued.
Declaration
protected virtual void OnContinueManipulation(PinchGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
PinchGesture | gesture | The current gesture. |
See Also
OnContinueManipulation(TapGesture)
Unity calls this method automatically when the manipulation is continued.
Declaration
protected virtual void OnContinueManipulation(TapGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TapGesture | gesture | The current gesture. |
See Also
OnContinueManipulation(TwistGesture)
Unity calls this method automatically when the manipulation is continued.
Declaration
protected virtual void OnContinueManipulation(TwistGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TwistGesture | gesture | The current gesture. |
See Also
OnContinueManipulation(TwoFingerDragGesture)
Unity calls this method automatically when the manipulation is continued.
Declaration
protected virtual void OnContinueManipulation(TwoFingerDragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TwoFingerDragGesture | gesture | The current gesture. |
See Also
OnEnable()
See
Declaration
protected override void OnEnable()
Overrides
OnEndManipulation(DragGesture)
Unity calls this method automatically when the manipulation is ended.
Declaration
protected virtual void OnEndManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
DragGesture | gesture | The current gesture. |
See Also
OnEndManipulation(PinchGesture)
Unity calls this method automatically when the manipulation is ended.
Declaration
protected virtual void OnEndManipulation(PinchGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
PinchGesture | gesture | The current gesture. |
See Also
OnEndManipulation(TapGesture)
Unity calls this method automatically when the manipulation is ended.
Declaration
protected virtual void OnEndManipulation(TapGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TapGesture | gesture | The current gesture. |
See Also
OnEndManipulation(TwistGesture)
Unity calls this method automatically when the manipulation is ended.
Declaration
protected virtual void OnEndManipulation(TwistGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TwistGesture | gesture | The current gesture. |
See Also
OnEndManipulation(TwoFingerDragGesture)
Unity calls this method automatically when the manipulation is ended.
Declaration
protected virtual void OnEndManipulation(TwoFingerDragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TwoFingerDragGesture | gesture | The current gesture. |
See Also
OnRegistered(InteractableRegisteredEventArgs)
This method is called by the Interaction Manager when this Interactable is registered with it.
Declaration
protected override void OnRegistered(InteractableRegisteredEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
InteractableRegisteredEventArgs | 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 is started.
Declaration
protected virtual void OnStartManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
DragGesture | gesture | The current gesture. |
See Also
OnStartManipulation(PinchGesture)
Unity calls this method automatically when the manipulation is started.
Declaration
protected virtual void OnStartManipulation(PinchGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
PinchGesture | gesture | The current gesture. |
See Also
OnStartManipulation(TapGesture)
Unity calls this method automatically when the manipulation is started.
Declaration
protected virtual void OnStartManipulation(TapGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TapGesture | gesture | The current gesture. |
See Also
OnStartManipulation(TwistGesture)
Unity calls this method automatically when the manipulation is started.
Declaration
protected virtual void OnStartManipulation(TwistGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TwistGesture | gesture | The current gesture. |
See Also
OnStartManipulation(TwoFingerDragGesture)
Unity calls this method automatically when the manipulation is started.
Declaration
protected virtual void OnStartManipulation(TwoFingerDragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TwoFingerDragGesture | gesture | The current gesture. |
See Also
OnUnregistered(InteractableUnregisteredEventArgs)
This method is called by the Interaction Manager when this Interactable is unregistered from it.
Declaration
protected override void OnUnregistered(InteractableUnregisteredEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
InteractableUnregisteredEventArgs | 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.
See Also
Reset()
See
Declaration
protected override void Reset()