Class ARTrackedObjectManager
A manager for ARTrackedObjects. Uses the XRObjectTrackingSubsystem
to recognize and track 3D objects in the physical environment.
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.ARTrackedObjectManager.html")]
public sealed class ARTrackedObjectManager : ARTrackableManager<XRObjectTrackingSubsystem, XRObjectTrackingSubsystemDescriptor, XRObjectTrackingSubsystem.Provider, XRTrackedObject, ARTrackedObject>
Properties
Name | Description |
---|---|
gameObjectName | The name to be used for the |
referenceLibrary | The |
trackedObjectPrefab | If not null, instantiates this Prefab for each detected object. |
Methods
Name | Description |
---|---|
GetPrefab() | Get the Prefab to instantiate for each ARTrackedObject. |
OnAfterSetSessionRelativeData(ARTrackedObject, XRTrackedObject) | Invoked just after each ARTrackedObject has been updated. |
OnBeforeStart() | Sets the object library on the subsystem before Start() is called on the base class. |
OnTrackablesChanged(List<ARTrackedObject>, List<ARTrackedObject>, List<ARTrackedObject>) | Invokes the trackedObjectsChanged event. |
Events
Name | Description |
---|---|
trackedObjectsChanged | Invoked once per frame with information about the ARTrackedObjects that have changed (that is, been added, updated, or removed).
This happens just before ARTrackedObjects are destroyed, so you can set |