docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SerializableGuid

    A Guid that can be serialized by Unity.

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

    The 128-bit Guid is stored as two 64-bit ulongs. See the creation utility, SerializableGuidUtil, for additional information.

    Constructors

    SerializableGuid(ulong, ulong)

    Constructs a SerializableGuid from two 64-bit ulong values.

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

    The low 8 bytes of the Guid.

    ulong guidHigh

    The high 8 bytes of the Guid.

    Properties

    Empty

    Represents System.Guid.Empty, a GUID whose value is all zeros.

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

    Guid

    Reconstructs the Guid from the serialized data.

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

    Methods

    Equals(object)

    Checks 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
    bool

    True if obj is a SerializableGuid with the same field values.

    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
    bool

    True if this SerializableGuid has the same field values as the other one.

    GetHashCode()

    Gets the hash code for this SerializableGuid.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The hash code.

    Overrides
    ValueType.GetHashCode()

    ToString()

    Generates a string representation of the Guid. Same as 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 ToString(string).

    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 ToString(string, IFormatProvider).

    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

    operator ==(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
    bool

    True if the SerializableGuids are equal to each other.

    operator !=(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
    bool

    True if the SerializableGuids are not equal to each other.

    Implements

    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)