Class ARRaycast
Represents a raycast that updates automatically.
Inheritance
ARRaycast
Implements
Inherited Members
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.ARFoundation
Assembly: Unity.XR.ARFoundation.dll
Syntax
[DefaultExecutionOrder(-2147483646)]
[DisallowMultipleComponent]
public sealed class ARRaycast : ARTrackable<XRRaycast, ARRaycast>, ITrackable
Remarks
Generated by the ARRaycastManager. Create a raycast with AddRaycast(Vector2, float).
Related information: AR Raycast Manager component
Properties
distance
The distance, in meters, between the raycast's origin and intersection point.
Declaration
public float distance { get; }
Property Value
Type | Description |
---|---|
float |
plane
The ARPlane hit by the raycast, or null
if the raycast does not intersect a plane.
Declaration
public ARPlane plane { get; }
Property Value
Type | Description |
---|---|
ARPlane |
Methods
OnAfterSetSessionRelativeData()
Marks this raycast as updated, causing the updated event to be invoked during the Update callback.
Declaration
protected override void OnAfterSetSessionRelativeData()
Overrides
Events
updated
Invoked whenever this raycast is updated. The event is fired during this MonoBehaviour
's
Update callback. This event is not
invoked if this component is disabled,
although it might continue to receive positional updates.
Declaration
public event Action<ARRaycastUpdatedEventArgs> updated
Event Type
Type | Description |
---|---|
Action<ARRaycastUpdatedEventArgs> |