Struct ARWorldMap | ARKit XR Plugin | 3.0.4
docs.unity3d.com
    Show / Hide Table of Contents

    Struct ARWorldMap

    The space-mapping state and set of planes and anchors from an AR session. This is a wrapper for ARKit's ARWorldMap Note: The ARWorldMap must be explicitly disposed to avoid leaking native resources.

    Namespace: UnityEngine.XR.ARKit
    Syntax
    public struct ARWorldMap : IDisposable, IEquatable<ARWorldMap>

    Properties

    valid

    Use this to determine whether this ARWorldMap is valid, or if it has been disposed.

    Declaration
    public bool valid { get; }
    Property Value
    Type Description
    Boolean

    Methods

    Dispose()

    Disposes of the world map. This releases the native ARWorldMap resource.

    Declaration
    public void Dispose()

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)

    Equals(ARWorldMap)

    Declaration
    public bool Equals(ARWorldMap other)
    Parameters
    Type Name Description
    ARWorldMap other
    Returns
    Type Description
    Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()

    Serialize(Allocator)

    Serialize the ARWorldMap to an array of bytes. This array may be saved to disk and loaded at another time to persist the session, or sent over a network to another ARKit-enabled app to share the session. It is an error to call this method after the ARWorldMap has been disposed.

    Declaration
    public NativeArray<byte> Serialize(Allocator allocator)
    Parameters
    Type Name Description
    Allocator allocator
    Returns
    Type Description
    NativeArray<Byte>

    An array of bytes representing the serialized ARWorldMap.

    TryDeserialize(NativeArray<Byte>, out ARWorldMap)

    Create a new ARWorldMap from a NativeArray of bytes produced from Serialize(Allocator). Use this to create an ARWorldMap from a serialized array of bytes, either loaded from disk or sent from another device.

    Declaration
    public static bool TryDeserialize(NativeArray<byte> serializedWorldMap, out ARWorldMap worldMap)
    Parameters
    Type Name Description
    NativeArray<Byte> serializedWorldMap

    An array of bytes representing a serialized ARWorldMap, produced by Serialize(Allocator).

    ARWorldMap worldMap
    Returns
    Type Description
    Boolean

    Operators

    Equality(ARWorldMap, ARWorldMap)

    Declaration
    public static bool operator ==(ARWorldMap lhs, ARWorldMap rhs)
    Parameters
    Type Name Description
    ARWorldMap lhs
    ARWorldMap rhs
    Returns
    Type Description
    Boolean

    Inequality(ARWorldMap, ARWorldMap)

    Declaration
    public static bool operator !=(ARWorldMap lhs, ARWorldMap rhs)
    Parameters
    Type Name Description
    ARWorldMap lhs
    ARWorldMap rhs
    Returns
    Type Description
    Boolean
    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