Interface IARInteractor
An interface that allows interactors to raycast against the AR environment.
Namespace: UnityEngine.XR.Interaction.Toolkit
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public interface IARInteractor
Properties
enableARRaycasting
Enables raycasts against AR environment trackables.
Declaration
bool enableARRaycasting { get; }
Property Value
| Type | Description |
|---|---|
| bool |
See Also
occludeARHitsWith2DObjects
Enables occlusion of AR raycast hits by 2D objects such as UI.
Declaration
bool occludeARHitsWith2DObjects { get; }
Property Value
| Type | Description |
|---|---|
| bool |
See Also
occludeARHitsWith3DObjects
Enables occlusion of AR raycast hits by 3D objects.
Declaration
bool occludeARHitsWith3DObjects { get; }
Property Value
| Type | Description |
|---|---|
| bool |
See Also
trackableType
The types of AR trackables that this interactor will be able to raycast against.
Declaration
TrackableType trackableType { get; }
Property Value
| Type | Description |
|---|---|
| TrackableType |
See Also
Methods
TryGetCurrentARRaycastHit(out ARRaycastHit)
Gets the first AR ray cast hit, if any ray cast hits are available.
Declaration
bool TryGetCurrentARRaycastHit(out ARRaycastHit raycastHit)
Parameters
| Type | Name | Description |
|---|---|---|
| ARRaycastHit | raycastHit | When this method returns, contains the ray cast hit if available; otherwise, the default value. |
Returns
| Type | Description |
|---|---|
| bool | Returns true if a hit occurred, implying the ray cast hit information is valid. Otherwise, returns false. |