Class ARTrackable
The base class for all ARTrackable<TSessionRelativeData, TTrackable> types.
ARTrackable<TSessionRelativeData, TTrackable>
Implements
Inherited Members
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, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.ARFoundation
Assembly: Unity.XR.ARFoundation.dll
Syntax
[Icon("Packages/com.unity.xr.arfoundation/Editor/Icons/d_ARVR@4x.png")]
public abstract class ARTrackable : MonoBehaviour, ITrackable
Remarks
A "trackable" is something that is tracked in the physical environment. These include:
Properties
nativePtr
Declaration
public abstract IntPtr nativePtr { get; }
Property Value
| Type | Description |
|---|---|
| IntPtr |
parentId
Declaration
public virtual TrackableId parentId { get; }
Property Value
| Type | Description |
|---|---|
| TrackableId |
pose
Declaration
public abstract Pose pose { get; }
Property Value
| Type | Description |
|---|---|
| Pose |
trackableId
Declaration
public abstract TrackableId trackableId { get; }
Property Value
| Type | Description |
|---|---|
| TrackableId |
trackingState
Declaration
public abstract TrackingState trackingState { get; }
Property Value
| Type | Description |
|---|---|
| TrackingState |
Methods
OnDestroy()
Notifies AR Foundation's internal systems that this trackable has been destroyed.
Declaration
protected void OnDestroy()
Remarks
If you override Unity's OnDestroy method in your ARTrackable-derived type, call
base.OnDestroy to ensure that AR Foundation is notified when your trackable type is destroyed.