Class CachedComponentFilter<TFilterType, TRootType> | Unity Reflect | 1.1.0-preview.6
docs.unity.cn
    Show / Hide Table of Contents

    Class CachedComponentFilter<TFilterType, TRootType>

    Class that allows for cached retrieval/filtering of multiple types of components into lists Proper usage of this class is:

    using (var componentFilter = new CachedComponentFilter<typeToFind,componentTypeThatContains>(instanceOfComponent)) {

    }

    Inheritance
    Object
    CachedComponentFilter<TFilterType, TRootType>
    Namespace: Unity.Labs.Utils
    Syntax
    public class CachedComponentFilter<TFilterType, TRootType> : IDisposable where TFilterType : class where TRootType : Component
    Type Parameters
    Name Description
    TFilterType
    TRootType

    Constructors

    CachedComponentFilter(TFilterType[], Boolean)

    Declaration
    public CachedComponentFilter(TFilterType[] componentList, bool includeDisabled = true)
    Parameters
    Type Name Description
    TFilterType[] componentList
    Boolean includeDisabled

    CachedComponentFilter(TRootType, CachedSearchType, Boolean)

    Declaration
    public CachedComponentFilter(TRootType componentRoot, CachedSearchType cachedSearchType = CachedSearchType.Children | CachedSearchType.Self, bool includeDisabled = true)
    Parameters
    Type Name Description
    TRootType componentRoot
    CachedSearchType cachedSearchType
    Boolean includeDisabled

    Methods

    Dispose()

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing

    GetMatchingComponents<TChildType>()

    Declaration
    public TChildType[] GetMatchingComponents<TChildType>()
        where TChildType : class, TFilterType
    Returns
    Type Description
    TChildType[]
    Type Parameters
    Name Description
    TChildType

    StoreMatchingComponents<TChildType>(List<TChildType>)

    Declaration
    public void StoreMatchingComponents<TChildType>(List<TChildType> outputList)
        where TChildType : class, TFilterType
    Parameters
    Type Name Description
    List<TChildType> outputList
    Type Parameters
    Name Description
    TChildType
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX