Class ARRaycastManager
Manages an XRRaycastSubsystem
, exposing raycast functionality in AR Foundation. Use this component
to raycast against trackables (that is, detected features in the physical environment) when they do not have
a presence in the Physics world.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARFoundation
Assembly: solution.dll
Syntax
[DefaultExecutionOrder(-2147483647)]
[DisallowMultipleComponent]
[RequireComponent(typeof(ARSessionOrigin))]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARRaycastManager.html")]
public sealed class ARRaycastManager : ARTrackableManager<XRRaycastSubsystem, XRRaycastSubsystemDescriptor, XRRaycastSubsystem.Provider, XRRaycast, ARRaycast>
Properties
Name | Description |
---|---|
gameObjectName | The name of the |
raycastPrefab | If not null, this prefab will be instantiated for each ARRaycast. |
Methods
Name | Description |
---|---|
AddRaycast(Vector2, float) | Creates an ARRaycast that updates automatically. ARRaycasts will continue to update until you remove them with RemoveRaycast(ARRaycast) or disable this component. |
GetPrefab() | Gets the Prefab that should be instantiated for each ARRaycast. Can be |
OnAfterSetSessionRelativeData(ARRaycast, XRRaycast) | Invoked just after a ARRaycast has been updated. |
OnAfterStart() | Invoked just after the subsystem has been |
Raycast(Ray, List<ARRaycastHit>, TrackableType) | Cast a |
Raycast(Vector2, List<ARRaycastHit>, TrackableType) | Cast a ray from a point in screen space against trackables, that is, detected features such as planes. |
RemoveRaycast(ARRaycast) | Removes an existing ARRaycast. |