Class CachedComponentFilter<TFilterType, TRootType>
Provides utility functions to retrieve filtered lists of components. The lists created are automatically cached.
Implements
Inherited Members
Namespace: Unity.XR.CoreUtils
Assembly: solution.dll
Syntax
public class CachedComponentFilter<TFilterType, TRootType> : IDisposable where TFilterType : class where TRootType : Component
Type Parameters
| Name | Description |
|---|---|
| TFilterType | The type of component to find. |
| TRootType | The type of component at the root of the hierarchy. |
Examples
Proper usage of this class is:
using (var componentFilter = new CachedComponentFilter<typeToFind,componentTypeThatContains>(instanceOfComponent))
{
}
Constructors
| Name | Description |
|---|---|
| CachedComponentFilter(TFilterType[], bool) | Initializes a new cached component filter. |
| CachedComponentFilter(TRootType, CachedSearchType, bool) | Initializes a new cached component filter. |
Methods
| Name | Description |
|---|---|
| Dispose() | Part of the IDisposable pattern. |
| Dispose(bool) | Disposes of the cached component filter. |
| GetMatchingComponents<TChildType>() | Get an array of matching components. |
| StoreMatchingComponents<TChildType>(List<TChildType>) | Store components that match TChildType. |