docs.unity3d.com
    Show / Hide Table of Contents

    Class UsesMeshesMethods

    Inheritance
    Object
    UsesMeshesMethods
    Namespace: Unity.MARS.Providers
    Syntax
    public static class UsesMeshesMethods : object

    Methods

    GetMeshes(IUsesMeshes, List<MRMesh>)

    Get the currently tracked meshes

    Declaration
    public static void GetMeshes(this IUsesMeshes obj, List<MRMesh> meshes)
    Parameters
    Type Name Description
    IUsesMeshes obj

    The IUsesMeshes instance

    List<MRMesh> meshes

    A list of MRMesh objects to which the currently tracked meshes will be added

    StartDetectingMeshes(IUsesMeshes)

    Start detecting meshes. Mesh detection is enabled on initialization, so this is only necessary after calling StopDetecting.

    Declaration
    public static void StartDetectingMeshes(this IUsesMeshes obj)
    Parameters
    Type Name Description
    IUsesMeshes obj

    The IUsesMeshes instance

    StopDetectingMeshes(IUsesMeshes)

    Stop detecting meshes. This will happen automatically on destroying the session. It is only necessary to call this method to pause mesh detection while maintaining camera tracking

    Declaration
    public static void StopDetectingMeshes(this IUsesMeshes obj)
    Parameters
    Type Name Description
    IUsesMeshes obj

    The IUsesMeshes instance

    SubscribeMeshAdded(IUsesMeshes, Action<MRMesh>)

    Subscribe to the meshAdded event, which is called when a mesh becomes tracked for the first time

    Declaration
    public static void SubscribeMeshAdded(this IUsesMeshes obj, Action<MRMesh> meshAdded)
    Parameters
    Type Name Description
    IUsesMeshes obj

    The IUsesMeshes instance

    Action<MRMesh> meshAdded

    The delegate to subscribe

    SubscribeMeshRemoved(IUsesMeshes, Action<MarsTrackableId>)

    Subscribe to the meshRemoved event, which is called when a tracked mesh is removed

    Declaration
    public static void SubscribeMeshRemoved(this IUsesMeshes obj, Action<MarsTrackableId> meshRemoved)
    Parameters
    Type Name Description
    IUsesMeshes obj

    The IUsesMeshes instance

    Action<MarsTrackableId> meshRemoved

    The delegate to subscribe

    SubscribeMeshUpdated(IUsesMeshes, Action<MRMesh>)

    Subscribe to the meshUpdated event, which is called when a tracked mesh has new data

    Declaration
    public static void SubscribeMeshUpdated(this IUsesMeshes obj, Action<MRMesh> meshUpdated)
    Parameters
    Type Name Description
    IUsesMeshes obj

    The IUsesMeshes instance

    Action<MRMesh> meshUpdated

    The delegate to subscribe

    UnsubscribeMeshAdded(IUsesMeshes, Action<MRMesh>)

    Unsubscribe from the meshAdded event, which is called when a mesh is added for the first time

    Declaration
    public static void UnsubscribeMeshAdded(this IUsesMeshes obj, Action<MRMesh> meshAdded)
    Parameters
    Type Name Description
    IUsesMeshes obj

    The IUsesMeshes instance

    Action<MRMesh> meshAdded

    The delegate to unsubscribe

    UnsubscribeMeshRemoved(IUsesMeshes, Action<MarsTrackableId>)

    Unsubscribe from the meshRemoved event, which is called when a tracked mesh is removed

    Declaration
    public static void UnsubscribeMeshRemoved(this IUsesMeshes obj, Action<MarsTrackableId> meshRemoved)
    Parameters
    Type Name Description
    IUsesMeshes obj

    The IUsesMeshes instance

    Action<MarsTrackableId> meshRemoved

    The delegate to unsubscribe

    UnsubscribeMeshUpdated(IUsesMeshes, Action<MRMesh>)

    Unsubscribe from the meshUpdated event, which is called when a tracked mesh has new data

    Declaration
    public static void UnsubscribeMeshUpdated(this IUsesMeshes obj, Action<MRMesh> meshUpdated)
    Parameters
    Type Name Description
    IUsesMeshes obj

    The IUsesMeshes instance

    Action<MRMesh> meshUpdated

    The delegate to unsubscribe

    Back to top
    Terms of use
    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