docs.unity.cn
    Show / Hide Table of Contents

    Class XRObjectTrackingSubsystem.Provider

    The API concrete class must implement for an XRObjectTrackingSubsystem.

    Inheritance
    Object
    XRObjectTrackingSubsystem.Provider
    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public abstract class Provider

    Properties

    library

    The library containing the reference objects for which to scan. If this is not null, the provider should begin scanning for the objects in the library. If null, the provider should stop scanning for objects.

    Declaration
    public virtual XRReferenceObjectLibrary library { set; }
    Property Value
    Type Description
    XRReferenceObjectLibrary

    Methods

    Destroy()

    Invoked just before this subsystem is destroyed.

    Declaration
    public virtual void Destroy()

    GetChanges(XRTrackedObject, Allocator)

    Get the changes (added, updated, and removed) to XRTrackedObjects since the last call to this method. It is typically invoked once per frame.

    Declaration
    public abstract TrackableChanges<XRTrackedObject> GetChanges(XRTrackedObject template, Allocator allocator)
    Parameters
    Type Name Description
    XRTrackedObject template

    A 'template' XRTrackedObject. XRTrackedObject may have fields added to it in the future; this template allows you to fill the arrays of added, updated, and removed with default values before copying in data from your own memory buffer.

    Allocator allocator

    The allocator to use for the added, updated, and removed arrays.

    Returns
    Type Description
    TrackableChanges<XRTrackedObject>

    A new TrackableChanges<T> containing the changes since the last call to this method, allocated with allocator.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 12 February 2021