Class XRImageTrackingSubsystem
A subsystem for detecting and tracking a preconfigured set of images in the environment.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Syntax
public abstract class XRImageTrackingSubsystem : TrackingSubsystem<XRTrackedImage, XRImageTrackingSubsystemDescriptor>
Constructors
XRImageTrackingSubsystem()
Constructs a subsystem. Do not invoked directly; call Create
on the XRImageTrackingSubsystemDescriptor instead.
Declaration
public XRImageTrackingSubsystem()
Properties
imageLibrary
Declaration
public XRReferenceImageLibrary imageLibrary { get; set; }
Property Value
Type | Description |
---|---|
XRReferenceImageLibrary |
maxNumberOfMovingImages
Declaration
public int maxNumberOfMovingImages { set; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
CreateProvider()
Create an implementation of the XRImageTrackingSubsystem.IProvider class. This will only be called once.
Declaration
protected abstract XRImageTrackingSubsystem.IProvider CreateProvider()
Returns
Type | Description |
---|---|
XRImageTrackingSubsystem.IProvider | An instance of the XRImageTrackingSubsystem.IProvider interface. |
Destroy()
Destroys the subsystem.
Declaration
public sealed override void Destroy()
GetChanges(Allocator)
Retrieve the changes in the state of tracked images (added, updated, removed) since the last call to GetChanges
.
Declaration
public override TrackableChanges<XRTrackedImage> GetChanges(Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
Allocator | allocator | The allocator to use for the returned set of changes. |
Returns
Type | Description |
---|---|
TrackableChanges<XRTrackedImage> | The set of tracked image changes (added, updated, removed) since the last call to this method. |
Overrides
Start()
Starts the subsystem, that is, start detecting images in the scene. imageLibrary must not be null.
Declaration
public override void Start()
Stop()
Stops the subsystem, that is, stops detecting and tracking images.
Declaration
public override void Stop()