docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ObservableList<T>

    Observable list.

    Inheritance
    object
    ObservableList<T>
    Implements
    IList<T>
    ICollection<T>
    IEnumerable<T>
    IEnumerable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public class ObservableList<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
    Type Parameters
    Name Description
    T

    Type of the list.

    Constructors

    Name Description
    ObservableList()

    Default Constructor.

    ObservableList(IEnumerable<T>)

    Constructor.

    ObservableList(int)

    Constructor.

    Properties

    Name Description
    Count

    Number of elements in the list.

    IsReadOnly

    Is the list read only?

    this[int]

    Accessor.

    Methods

    Name Description
    Add(T)

    Add an item to the list.

    Add(params T[])

    Add multiple objects to the list.

    Clear()

    Clear the list.

    Contains(T)

    Check if an element is present in the list.

    CopyTo(T[], int)

    Copy items in the list to an array.

    GetEnumerator()

    Get enumerator.

    IndexOf(T)

    Get the index of an item.

    Insert(int, T)

    Insert an item in the list.

    Remove(T)

    Remove an item from the list.

    Remove(params T[])

    Remove multiple items from the list.

    RemoveAt(int)

    Remove an item at a specific index.

    Events

    Name Description
    ItemAdded

    Added item event.

    ItemRemoved

    Removed item event.

    Extension Methods

    RemoveRangeExtensions.TryRemoveElementsInRange<TValue>(IList<TValue>, int, int, out Exception)
    RemoveRangeExtensions.TryRemoveElementsInRange<TValue>(IList<TValue>, int, int, out Exception)
    SwapCollectionExtensions.TrySwap<TValue>(IList<TValue>, int, int, out Exception)
    SwapCollectionExtensions.TrySwap<TValue>(IList<TValue>, int, int, out Exception)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)