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

    Struct UnsafeParallelHashSet<T>.ReadOnly

    A read-only alias for the value of a UnsafeParallelHashSet. Does not have its own allocated storage.

    Namespace: Unity.Collections.LowLevel.Unsafe
    Syntax
    [NativeContainer]
    [NativeContainerIsReadOnly]
    public struct ReadOnly : IEnumerable<T>, IEnumerable

    Properties

    Capacity

    The number of items that fit in the current allocation.

    Declaration
    public readonly int Capacity { get; }
    Property Value
    Type Description
    Int32

    The number of items that fit in the current allocation.

    IsCreated

    Whether this hash set has been allocated (and not yet deallocated).

    Declaration
    public readonly bool IsCreated { get; }
    Property Value
    Type Description
    Boolean

    True if this hash set has been allocated (and not yet deallocated).

    IsEmpty

    Whether this hash set is empty.

    Declaration
    public readonly bool IsEmpty { get; }
    Property Value
    Type Description
    Boolean

    True if this hash set is empty or if the map has not been constructed.

    Methods

    Contains(T)

    Returns true if a given item is present in this hash set.

    Declaration
    public bool Contains(T item)
    Parameters
    Type Name Description
    T item

    The item to look up.

    Returns
    Type Description
    Boolean

    True if the item was present.

    Count()

    The current number of items in this hash set.

    Declaration
    public int Count()
    Returns
    Type Description
    Int32

    The current number of items in this hash set.

    GetEnumerator()

    Returns an enumerator over the items of this hash set.

    Declaration
    public UnsafeParallelHashSet<T>.Enumerator GetEnumerator()
    Returns
    Type Description
    UnsafeParallelHashSet.Enumerator<>

    An enumerator over the items of this hash set.

    ToNativeArray(AllocatorManager.AllocatorHandle)

    Returns an array with a copy of all this hash set's items (in no particular order).

    Declaration
    public NativeArray<T> ToNativeArray(AllocatorManager.AllocatorHandle allocator)
    Parameters
    Type Name Description
    AllocatorManager.AllocatorHandle allocator

    The allocator to use.

    Returns
    Type Description
    NativeArray<T>

    An array with a copy of all this hash set's items (in no particular order).

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