docs.unity3d.com
    Show / Hide Table of Contents

    Struct SerializableGuid

    A Guid that can be serialized by Unity. The 128-bit Guid is stored as two 64-bit ulongs. See also the creation utility at UnityEditor.XR.ARSubsystems.SerializableGuidUtil.

    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.XR.CoreUtils
    Syntax
    [Serializable]
    public struct SerializableGuid : IEquatable<SerializableGuid>

    Constructors

    SerializableGuid(UInt64, UInt64)

    Constructs a SerializableGuid from two 64-bit ulongs.

    Declaration
    public SerializableGuid(ulong guidLow, ulong guidHigh)
    Parameters
    Type Name Description
    UInt64 guidLow

    The low 8 bytes of the Guid.

    UInt64 guidHigh

    The high 8 bytes of the Guid.

    Properties

    Empty

    Used to represent System.Guid.Empty, e.g., a GUID whose value is all zeros.

    Declaration
    public static readonly SerializableGuid Empty { get; }
    Property Value
    Type Description
    SerializableGuid

    Guid

    Reconstructs the Guid from the serialized data.

    Declaration
    public readonly Guid Guid { get; }
    Property Value
    Type Description
    Guid

    Methods

    Equals(Object)

    Check if this SerializableGuid is equal to an object

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The object to check

    Returns
    Type Description
    Boolean

    True if this SerializableGuid is equal to the object

    Overrides
    ValueType.Equals(Object)

    Equals(SerializableGuid)

    Check if this SerializableGuid is equal to another SerializableGuid

    Declaration
    public bool Equals(SerializableGuid other)
    Parameters
    Type Name Description
    SerializableGuid other

    The other SerializableGuid

    Returns
    Type Description
    Boolean

    True if this SerializableGuid is equal to the other one

    Implements
    IEquatable<T>.Equals(T)

    GetHashCode()

    Get the hash code for this SerializableGuid

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    The hash code

    Overrides
    ValueType.GetHashCode()

    ToString()

    Generates a string representation of the Guid. Same as Guid.ToString(). See Microsoft's documentation for more details.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string representation of the Guid.

    Overrides
    ValueType.ToString()

    ToString(String)

    Generates a string representation of the Guid. Same as Guid.ToString(format).

    Declaration
    public string ToString(string format)
    Parameters
    Type Name Description
    String format

    A single format specifier that indicates how to format the value of the Guid. See Microsoft's documentation for more details.

    Returns
    Type Description
    String

    A string representation of the Guid.

    ToString(String, IFormatProvider)

    Generates a string representation of the Guid. Same as Guid.ToString(format, provider).

    Declaration
    public string ToString(string format, IFormatProvider provider)
    Parameters
    Type Name Description
    String format

    A single format specifier that indicates how to format the value of the Guid. See Microsoft's documentation for more details.

    IFormatProvider provider

    An object that supplies culture-specific formatting information.

    Returns
    Type Description
    String

    A string representation of the Guid.

    Operators

    Equality(SerializableGuid, SerializableGuid)

    Perform an equality operation on two SerializableGuids

    Declaration
    public static bool operator ==(SerializableGuid lhs, SerializableGuid rhs)
    Parameters
    Type Name Description
    SerializableGuid lhs

    The left-hand SerializableGuid

    SerializableGuid rhs

    The right-hand SerializableGuid

    Returns
    Type Description
    Boolean

    True if the SerializableGuids are equal to each other

    Inequality(SerializableGuid, SerializableGuid)

    Perform an inequality operation on two SerializableGuids

    Declaration
    public static bool operator !=(SerializableGuid lhs, SerializableGuid rhs)
    Parameters
    Type Name Description
    SerializableGuid lhs

    The left-hand SerializableGuid

    SerializableGuid rhs

    The right-hand SerializableGuid

    Returns
    Type Description
    Boolean

    True if the SerializableGuids are not equal to each other

    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