Class ARTrackedImageManager
A manager for ARTrackedImages. Uses the XRImageTrackingSubsystem
to recognize and track 2D images in the physical environment.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARFoundation
Assembly: solution.dll
Syntax
[DefaultExecutionOrder(-2147483647)]
[RequireComponent(typeof(ARSessionOrigin))]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARTrackedImageManager.html")]
public sealed class ARTrackedImageManager : ARTrackableManager<XRImageTrackingSubsystem, XRImageTrackingSubsystemDescriptor, XRImageTrackingSubsystem.Provider, XRTrackedImage, ARTrackedImage>
Properties
Name | Description |
---|---|
currentMaxNumberOfMovingImages | Get the maximum number of moving images to track in real time that is currently in use by the subsystem. |
gameObjectName | The name to be used for the |
maxNumberOfMovingImages | The maximum number of moving images to track in real time. This property is obsolete. Use requestedMaxNumberOfMovingImages or currentMaxNumberOfMovingImages instead. |
referenceLibrary | Get or set the reference image library (that is, the set of images to search for in the physical environment). |
requestedMaxNumberOfMovingImages | The requested maximum number of moving images to track in real time. Support can vary between devices and providers. Check
for support at runtime with descriptor's
|
trackedImagePrefab | If not null, instantiates this Prefab for each detected image. |
Methods
Name | Description |
---|---|
CreateRuntimeLibrary(XRReferenceImageLibrary) | Creates a |
GetPrefab() | Get the Prefab that will be instantiated for each ARTrackedImage. |
OnAfterSetSessionRelativeData(ARTrackedImage, XRTrackedImage) | Invoked just after updating each ARTrackedImage. Used to update the referenceImage. |
OnBeforeStart() | Sets the image library on the subsystem before Start() is called on the |
OnTrackablesChanged(List<ARTrackedImage>, List<ARTrackedImage>, List<ARTrackedImage>) | Invokes the trackedImagesChanged event. |
Events
Name | Description |
---|---|
trackedImagesChanged | Invoked once per frame with information about the ARTrackedImages that have changed (that is, been added, updated, or removed).
This happens just before ARTrackedImages are destroyed, so you can set |