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

    Class IUsesMarkerTrackingMethods

    Inheritance
    Object
    IUsesMarkerTrackingMethods
    Namespace: Unity.MARS
    Syntax
    public static class IUsesMarkerTrackingMethods

    Methods

    GetMarkers(IUsesMarkerTracking, List<MRMarker>)

    Get the currently tracked markers

    Declaration
    public static void GetMarkers(this IUsesMarkerTracking obj, List<MRMarker> markers)
    Parameters
    Type Name Description
    IUsesMarkerTracking obj
    List<MRMarker> markers

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

    SetActiveMarkerLibrary(IUsesMarkerTracking, IMRMarkerLibrary)

    Declaration
    public static bool SetActiveMarkerLibrary(this IUsesMarkerTracking obj, IMRMarkerLibrary markerLibrary)
    Parameters
    Type Name Description
    IUsesMarkerTracking obj
    IMRMarkerLibrary markerLibrary
    Returns
    Type Description
    Boolean

    StartTrackingMarkers(IUsesMarkerTracking)

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

    Declaration
    public static void StartTrackingMarkers(this IUsesMarkerTracking obj)
    Parameters
    Type Name Description
    IUsesMarkerTracking obj

    StopTrackingMarkers(IUsesMarkerTracking)

    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
    public static void StopTrackingMarkers(this IUsesMarkerTracking obj)
    Parameters
    Type Name Description
    IUsesMarkerTracking obj

    SubscribeMarkerAdded(IUsesMarkerTracking, Action<MRMarker>)

    Subscribe to the markerAdded event, which is called when a marker becomes tracked for the first time

    Declaration
    public static void SubscribeMarkerAdded(this IUsesMarkerTracking obj, Action<MRMarker> markerAdded)
    Parameters
    Type Name Description
    IUsesMarkerTracking obj
    Action<MRMarker> markerAdded

    The delegate to subscribe

    SubscribeMarkerRemoved(IUsesMarkerTracking, Action<MRMarker>)

    Subscribe to the markerRemoved event, which is called when a tracked marker is removed (lost)

    Declaration
    public static void SubscribeMarkerRemoved(this IUsesMarkerTracking obj, Action<MRMarker> markerRemoved)
    Parameters
    Type Name Description
    IUsesMarkerTracking obj
    Action<MRMarker> markerRemoved

    The delegate to subscribe

    SubscribeMarkerUpdated(IUsesMarkerTracking, Action<MRMarker>)

    Subscribe to the markerUpdated event, which is called when a tracked marker has updated data

    Declaration
    public static void SubscribeMarkerUpdated(this IUsesMarkerTracking obj, Action<MRMarker> markerUpdated)
    Parameters
    Type Name Description
    IUsesMarkerTracking obj
    Action<MRMarker> markerUpdated

    The delegate to subscribe

    UnsubscribeMarkerAdded(IUsesMarkerTracking, Action<MRMarker>)

    Unsubscribe from the markerAdded event, which is called when a marker becomes tracked for the first time

    Declaration
    public static void UnsubscribeMarkerAdded(this IUsesMarkerTracking obj, Action<MRMarker> markerAdded)
    Parameters
    Type Name Description
    IUsesMarkerTracking obj
    Action<MRMarker> markerAdded

    The delegate to unsubscribe

    UnsubscribeMarkerRemoved(IUsesMarkerTracking, Action<MRMarker>)

    Unsubscribe from the markerRemoved event, which is called when a tracked marker is removed (lost)

    Declaration
    public static void UnsubscribeMarkerRemoved(this IUsesMarkerTracking obj, Action<MRMarker> markerRemoved)
    Parameters
    Type Name Description
    IUsesMarkerTracking obj
    Action<MRMarker> markerRemoved

    The delegate to unsubscribe

    UnsubscribeMarkerUpdated(IUsesMarkerTracking, Action<MRMarker>)

    Unsubscribe from the markerUpdated event, which is called when a tracked marker has updated data

    Declaration
    public static void UnsubscribeMarkerUpdated(this IUsesMarkerTracking obj, Action<MRMarker> markerUpdated)
    Parameters
    Type Name Description
    IUsesMarkerTracking obj
    Action<MRMarker> markerUpdated

    The delegate to unsubscribe

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