docs.unity3d.com
    目次を表示する/隠す

    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: UnityEngine.XR.ARSubsystems
    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 (that is, a GUID whose values are 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)

    Tests for equality.

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

    The object to compare against.

    Returns
    Type Description
    Boolean

    True if obj is of type SerializableGuid and Equals(SerializableGuid) also returns true; otherwise false.

    Overrides
    ValueType.Equals(Object)

    Equals(SerializableGuid)

    Tests for equality.

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

    The other SerializableGuid to compare against.

    Returns
    Type Description
    Boolean

    True if every field in other is equal to this SerializableGuid, otherwise false.

    Implements
    IEquatable<T>.Equals(T)

    GetHashCode()

    Generates a hash suitable for use with containers like HashSet and Dictionary.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code generated from this object's fields.

    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)

    Tests for equality. Same as Equals(SerializableGuid).

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

    The left-hand side of the comparison.

    SerializableGuid rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    Boolean

    True if lhs is equal to rhs, otherwise false.

    Inequality(SerializableGuid, SerializableGuid)

    Tests for inequality. Same as !Equals(SerializableGuid).

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

    The left-hand side of the comparison.

    SerializableGuid rhs

    The right-hand side of the comparison.

    Returns
    Type Description
    Boolean

    True if lhs is not equal to rhs, otherwise false.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)