docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ARCollaborationDataBuilder

    Use this to construct an ARCollaborationData incrementally from serialized bytes.

    Implements
    IDisposable
    IEquatable<ARCollaborationDataBuilder>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: UnityEngine.XR.ARKit
    Assembly: solution.dll
    Syntax
    public struct ARCollaborationDataBuilder : IDisposable, IEquatable<ARCollaborationDataBuilder>
    Remarks

    This struct can be useful if you receive data through a stream. If you already have all the bytes, use a ARCollaborationData constructor instead. This struct represents a native resource and must be explicitly disposed when no longer needed. While this struct is not thread safe, you can construct, Dispose, and Append from any thread.

    Properties

    Name Description
    hasData

    Whether the ARCollaborationDataBuilder has allocated any data. If true, this struct must be disposed to avoid leaking native resources. If false, this struct either never allocated memory (with Append(byte[], int, int) or Append(NativeSlice<byte>)) or it has already been Dispose()d.

    length

    The number of bytes owned by this struct.

    Methods

    Name Description
    Append(byte[])

    Appends all bytes of the array buffer to an existing array of bytes.

    Append(byte[], int, int)

    Appends size bytes of the array buffer to an existing array of bytes.

    Append(NativeSlice<byte>)

    Appends bytes to an existing array of bytes.

    Dispose()

    Releases the native resource.

    Equals(object)

    IEquatable interface. Compares for equality.

    Equals(ARCollaborationDataBuilder)

    IEquatable interface. Compares for equality.

    GetHashCode()

    Computes a hash code suitable for use in a Dictionary or HashSet.

    ToCollaborationData()

    Converts the bytes accumulated through calls to Append(byte[], int, int) to an ARCollaborationData. The caller is responsible for disposing the returned ARCollaborationData.

    Operators

    Name Description
    operator ==(ARCollaborationDataBuilder, ARCollaborationDataBuilder)

    Compares for equality. Same as Equals(ARCollaborationDataBuilder).

    operator !=(ARCollaborationDataBuilder, ARCollaborationDataBuilder)

    Compares for inequality. Same as !Equals(ARCollaborationDataBuilder).

    In This Article
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Friday, September 22, 2023