docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ARCollaborationData

    Represents the Objective-C type ARCollaborationData.

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

    This struct mirrors the Objective-C type ARCollaborationData. Because it represents a native resource, it must be explicitly disposed when no longer needed.

    ARCollaborationData can be constructed from a byte array, or from DequeueCollaborationData().

    This struct is not thread-safe, but it may be constructed and disposed on any thread.

    Constructors

    Name Description
    ARCollaborationData(byte[])

    Constructs an ARCollaborationData from a byte array. Check valid after construction to ensure bytes was successfully deserialized.

    ARCollaborationData(byte[], int, int)

    Constructs an ARCollaborationData from a byte array. Check valid after construction to ensure bytes was successfully deserialized.

    ARCollaborationData(NativeSlice<byte>)

    Constructs an ARCollaborationData from a NativeSlice of bytes. Check valid after construction to ensure bytes was successfully deserialized.

    Properties

    Name Description
    priority

    Gets the priority of the collaboration data. Use this to determine how you should send the information to peers in a collaborative session (for example, reliably vs. unreliably.)

    valid

    True if the data is valid. The data might be invalid if this object was constructed with an invalid byte array, or if it has been disposed.

    Methods

    Name Description
    Dispose()

    Dispose the native ARCollaborationData. valid will be false after disposal. It is safe to dispose an invalid or already disposed ARCollaborationData.

    Equals(object)

    Compares for equality.

    Equals(ARCollaborationData)

    Compares for equality.

    GetHashCode()

    Generates a hash code suitable for use in HashSet and Dictionary.

    ToSerialized()

    Copies the bytes that represent the serialized ARCollaborationData to a SerializedARCollaborationData. A common use case would be to send these bytes to another device over a network.

    Operators

    Name Description
    operator ==(ARCollaborationData, ARCollaborationData)

    Compares lhs and rhs for equality using Equals(ARCollaborationData).

    operator !=(ARCollaborationData, ARCollaborationData)

    Compares lhs and rhs for inequality using Equals(ARCollaborationData).

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