Interface IProvidesMarkerTracking | MARS | 1.0.1
docs.unity3d.com
    Show / Hide Table of Contents

    Interface IProvidesMarkerTracking

    Defines the API for a Marker Tracking Provider This functionality provider is responsible for marker tracking

    Inherited Members
    IFunctionalityProvider.LoadProvider()
    IFunctionalityProvider.ConnectSubscriber(Object)
    IFunctionalityProvider.UnloadProvider()
    Namespace: Unity.MARS
    Syntax
    public interface IProvidesMarkerTracking : IFunctionalityProvider

    Methods

    GetMarkers(List<MRMarker>)

    Get the currently tracked markers

    Declaration
    void GetMarkers(List<MRMarker> markers)
    Parameters
    Type Name Description
    List<MRMarker> markers

    A list of MRMarker objects to which the currently tracked markers will be added

    SetActiveMarkerLibrary(IMRMarkerLibrary)

    Initialize the list of markers to look for when this marker tracking provider starts tracking. If an existing marker library is being used, this one replaces the active one and images contained in this marker library start getting detected. The existing tracked markers will stop receiving update events, and they may be removed.

    Declaration
    bool SetActiveMarkerLibrary(IMRMarkerLibrary activeLibrary)
    Parameters
    Type Name Description
    IMRMarkerLibrary activeLibrary

    Marker library with list of markers to detect

    Returns
    Type Description
    Boolean

    StartTrackingMarkers()

    Start tracking markers. Marker tracking is enabled on initialization, so this is only necessary after calling StopTrackingMarkers.

    Declaration
    void StartTrackingMarkers()

    StopTrackingMarkers()

    Stop tracking markers. This will happen automatically on destroying the session. It is only necessary to call this method to pause marker tracking while maintaining camera tracking.

    Declaration
    void StopTrackingMarkers()

    Events

    markerAdded

    Called when a marker becomes tracked for the first time

    Declaration
    event Action<MRMarker> markerAdded
    Event Type
    Type Description
    Action<MRMarker>

    markerRemoved

    Called when a tracked marker is removed (lost)

    Declaration
    event Action<MRMarker> markerRemoved
    Event Type
    Type Description
    Action<MRMarker>

    markerUpdated

    Called when a tracked marker has updated data

    Declaration
    event Action<MRMarker> markerUpdated
    Event Type
    Type Description
    Action<MRMarker>
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023