docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class FixedQueue<T>

    Queue with a fixed size

    Inheritance
    object
    FixedQueue<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: MLAPI.Collections
    Assembly: Unity.Multiplayer.MLAPI.Runtime.dll
    Syntax
    public sealed class FixedQueue<T>
    Type Parameters
    Name Description
    T

    The type of the queue

    Constructors

    FixedQueue(int)

    Creates a new FixedQueue with a given size

    Declaration
    public FixedQueue(int maxSize)
    Parameters
    Type Name Description
    int maxSize

    The size of the queue

    Properties

    Count

    The amount of enqueued objects

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

    this[int]

    Gets the element at a given virtual index

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

    The virtual index to get the item from

    Property Value
    Type Description
    T

    The element at the virtual index

    Methods

    Dequeue()

    Dequeues an object

    Declaration
    public T Dequeue()
    Returns
    Type Description
    T

    ElementAt(int)

    Gets the element at a given virtual index

    Declaration
    public T ElementAt(int index)
    Parameters
    Type Name Description
    int index

    The virtual index to get the item from

    Returns
    Type Description
    T

    The element at the virtual index

    Enqueue(T)

    Enqueues an object

    Declaration
    public bool Enqueue(T t)
    Parameters
    Type Name Description
    T t
    Returns
    Type Description
    bool
    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)