Struct World.NoAllocReadOnlyCollection<T> | Entities | 0.10.0-preview.6
docs.unity3d.com
    Show / Hide Table of Contents

    Struct World.NoAllocReadOnlyCollection<T>

    Read only collection that doesn't generate garbage when used in a foreach.

    Namespace: Unity.Entities
    Syntax
    public struct NoAllocReadOnlyCollection<T> : IEnumerable<T>, IEnumerable
    Type Parameters
    Name Description
    T

    Constructors

    NoAllocReadOnlyCollection(List<T>)

    Declaration
    public NoAllocReadOnlyCollection(List<T> source)
    Parameters
    Type Name Description
    List<T> source

    Properties

    Count

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

    Item[Int32]

    Declaration
    public T this[int index] { get; }
    Parameters
    Type Name Description
    Int32 index
    Property Value
    Type Description
    T

    Methods

    Contains(T)

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

    GetEnumerator()

    Declaration
    public List<T>.Enumerator GetEnumerator()
    Returns
    Type Description
    List.Enumerator<>
    In This Article
    • Constructors
      • NoAllocReadOnlyCollection(List<T>)
    • Properties
      • Count
      • Item[Int32]
    • Methods
      • Contains(T)
      • GetEnumerator()
    Back to top
    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