Interface IXRSelectInteractable
An interface that represents an Interactable component which an Interactor component can select.
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.Interactables
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
public interface IXRSelectInteractable : IXRInteractable
Properties
firstInteractorSelecting
(Read Only) The first interactor that selected this interactable since not being selected by any interactor. The interactor may not currently be selecting this interactable, which would be the case when it released while multiple interactors were selecting this interactable.
Declaration
IXRSelectInteractor firstInteractorSelecting { get; }
Property Value
Type | Description |
---|---|
IXRSelect |
See Also
firstSelectEntered
The event that is called only when the first Interactor begins selecting this Interactable as the sole selecting Interactor. Subsequent Interactors that begin selecting this Interactable will not cause this event to be invoked as long as any others are still selecting.
Declaration
SelectEnterEvent firstSelectEntered { get; }
Property Value
Type | Description |
---|---|
Select |
Remarks
The Select
See Also
interactorsSelecting
(Read Only) The list of Interactors currently selecting this Interactable (may by empty).
Declaration
List<IXRSelectInteractor> interactorsSelecting { get; }
Property Value
Type | Description |
---|---|
List<IXRSelect |
Remarks
You should treat this as a read only view of the list and should not modify it.
It is exposed as a List<T> rather than an IRead
See Also
isSelected
(Read Only) Indicates whether this interactable is currently being selected by any interactor.
Declaration
bool isSelected { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
In other words, returns whether interactors
Examples
interactorsSelecting.Count > 0
See Also
lastSelectExited
The event that is called only when the last remaining selecting Interactor ends selecting this Interactable.
Declaration
SelectExitEvent lastSelectExited { get; }
Property Value
Type | Description |
---|---|
Select |
Remarks
The Select
See Also
selectEntered
The event that is called when an Interactor begins selecting this Interactable.
Declaration
SelectEnterEvent selectEntered { get; }
Property Value
Type | Description |
---|---|
Select |
Remarks
The Select
See Also
selectExited
The event that is called when an Interactor ends selecting this Interactable.
Declaration
SelectExitEvent selectExited { get; }
Property Value
Type | Description |
---|---|
Select |
Remarks
The Select
See Also
selectMode
Indicates the selection policy of an Interactable.
Declaration
InteractableSelectMode selectMode { get; }
Property Value
Type | Description |
---|---|
Interactable |
See Also
Methods
GetAttachPoseOnSelect(IXRSelectInteractor)
Gets the world position and rotation of the Attach Transform captured during the moment of selection.
Declaration
Pose GetAttachPoseOnSelect(IXRSelectInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
IXRSelect |
interactor | The specific Interactor as context to get the attachment point for. |
Returns
Type | Description |
---|---|
Pose | Returns the world pose of the attachment point during the moment of selection, and otherwise the identity Pose if it was not selected by it during the current selection stack. |
See Also
GetLocalAttachPoseOnSelect(IXRSelectInteractor)
Gets the local position and rotation of the Attach Transform captured during the moment of selection.
Declaration
Pose GetLocalAttachPoseOnSelect(IXRSelectInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
IXRSelect |
interactor | The specific Interactor as context to get the attachment point for. |
Returns
Type | Description |
---|---|
Pose | Returns the local pose of the attachment point during the moment of selection, and otherwise the identity Pose if it was not selected by it during the current selection stack. |
See Also
IsSelectableBy(IXRSelectInteractor)
Determines if a given Interactor can select this Interactable.
Declaration
bool IsSelectableBy(IXRSelectInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
IXRSelect |
interactor | Interactor to check for a valid selection with. |
Returns
See Also
OnSelectEntered(SelectEnterEventArgs)
The XRInteraction
Declaration
void OnSelectEntered(SelectEnterEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Select |
args | Event data containing the Interactor that is initiating the selection. |
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnSelectEntering(SelectEnterEventArgs)
The XRInteraction
Declaration
void OnSelectEntering(SelectEnterEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Select |
args | Event data containing the Interactor that is initiating the selection. |
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnSelectExited(SelectExitEventArgs)
The XRInteraction
Declaration
void OnSelectExited(SelectExitEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Select |
args | Event data containing the Interactor that is ending the selection. |
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnSelectExiting(SelectExitEventArgs)
The XRInteraction
Declaration
void OnSelectExiting(SelectExitEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Select |
args | Event data containing the Interactor that is ending the selection. |
Remarks
args
is only valid during this method call, do not hold a reference to it.