Class ARWorldMapSessionExtensions | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class ARWorldMapSessionExtensions

    XRSessionSubsystem extensions for interacting with ARWorldMaps.

    Inheritance
    System.Object
    ARWorldMapSessionExtensions
    Namespace: UnityEngine.XR.ARKit
    Syntax
    public static class ARWorldMapSessionExtensions

    Methods

    ApplyWorldMap(XRSessionSubsystem, ARWorldMap)

    Declaration
    public static void ApplyWorldMap(this XRSessionSubsystem sessionSubsystem, ARWorldMap worldMap)
    Parameters
    Type Name Description
    XRSessionSubsystem sessionSubsystem
    ARWorldMap worldMap

    GetARWorldMapAsync(XRSessionSubsystem)

    Asynchronously create an ARWorldMap. An ARWorldMap represents the state of the session and can be serialized to a byte array to persist the session data, or send it to another device for shared AR experiences. It is a wrapper for ARKit's ARWorldMap. See also ApplyWorldMap(XRSessionSubsystem, ARWorldMap). and WorldMapSupported(XRSessionSubsystem).

    Declaration
    public static ARWorldMapRequest GetARWorldMapAsync(this XRSessionSubsystem sessionSubsystem)
    Parameters
    Type Name Description
    XRSessionSubsystem sessionSubsystem

    The XRSessionSubsystem being extended.

    Returns
    Type Description
    ARWorldMapRequest

    An ARWorldMapRequest which can be used to determine the status of the request and get the ARWorldMap when complete.

    GetARWorldMapAsync(XRSessionSubsystem, Action<ARWorldMapRequestStatus, ARWorldMap>)

    Asynchronously create an ARWorldMap. An ARWorldMap represents the state of the session and can be serialized to a byte array to persist the session data, or send it to another device for shared AR experiences. It is a wrapper for ARKit's ARWorldMap. See also ApplyWorldMap(XRSessionSubsystem, ARWorldMap). and WorldMapSupported(XRSessionSubsystem).

    If the ARWorldMapRequestStatus is Success, then the resulting ARWorldMap must be disposed to avoid leaking native resources. Otherwise, the ARWorldMap is not valid, and need not be disposed.

    Declaration
    public static void GetARWorldMapAsync(this XRSessionSubsystem sessionSubsystem, Action<ARWorldMapRequestStatus, ARWorldMap> onComplete)
    Parameters
    Type Name Description
    XRSessionSubsystem sessionSubsystem

    The XRSessionSubsystem being extended.

    System.Action<ARWorldMapRequestStatus, ARWorldMap> onComplete

    A method to invoke when the world map has either been created, or determined that it could not be created. Check the value of the ARWorldMapRequestStatus parameter to determine whether the world map was successfully created.

    GetWorldMappingStatus(XRSessionSubsystem)

    Get the world mapping status. Used to determine the suitability of the current session for creating an ARWorldMap.

    Declaration
    public static ARWorldMappingStatus GetWorldMappingStatus(this XRSessionSubsystem sessionSubsystem)
    Parameters
    Type Name Description
    XRSessionSubsystem sessionSubsystem

    The XRSessionSubsystem being extended.

    Returns
    Type Description
    ARWorldMappingStatus

    The ARWorldMappingStatus of the session.

    WorldMapSupported(XRSessionSubsystem)

    Detect ARWorldMap support. ARWorldMap requires iOS 12 or greater. See also GetARWorldMapAsync(XRSessionSubsystem).

    Declaration
    public static bool WorldMapSupported(this XRSessionSubsystem sessionSubsystem)
    Parameters
    Type Name Description
    XRSessionSubsystem sessionSubsystem

    The XRSessionSubsystem being extended.

    Returns
    Type Description
    System.Boolean

    true if ARWorldMaps are supported, otherwise false.

    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