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.Providers
    Syntax
    [MovedFrom("Unity.MARS")]
    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 — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)