docs.unity3d.com
    显示 / 隐藏目录

    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>
    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)