Class ARSelectionInteractable
Controls the selection of an object through a Tap gesture.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.AR
Syntax
public class ARSelectionInteractable : ARBaseGestureInteractable
Properties
selectionVisualization
The visualization
Declaration
public GameObject selectionVisualization { get; set; }
Property Value
Type | Description |
---|---|
GameObject |
Methods
CanStartManipulationForGesture(TapGesture)
Determines if the manipulation can be started for the given gesture.
Declaration
protected override 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. |
Overrides
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
OnEndManipulation(TapGesture)
Unity calls this method automatically when the manipulation is ended.
Declaration
protected override void OnEndManipulation(TapGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TapGesture | gesture | The current gesture. |
Overrides
See Also
OnSelectEntering(SelectEnterEventArgs)
This method is called by the Interaction Manager right before the Interactor first initiates selection of an Interactable in a first pass.
Declaration
protected override void OnSelectEntering(SelectEnterEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
SelectEnterEventArgs | args | Event data containing the Interactor that is initiating the selection. |
Overrides
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnSelectExiting(SelectExitEventArgs)
This method is called by the Interaction Manager right before the Interactor ends selection of an Interactable in a first pass.
Declaration
protected override void OnSelectExiting(SelectExitEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
SelectExitEventArgs | args | Event data containing the Interactor that is ending the selection. |
Overrides
Remarks
args
is only valid during this method call, do not hold a reference to it.