API reference
API reference
Select your platform
No SDKs available
No versions available

TagSetFilter Class

Extends MonoBehaviour, IGameObjectFilter
Leverages TagSets to fill the IGameObjectFilter role of determining whether a GameObject should be included in or excluded from a certain operation - for example, whether an Interactor<TInteractor, TInteractable> should be allowed to interact with an Interactable<TInteractor, TInteractable>.
TagSetFilter supports both "require tags" and "exclude tags". "Require tags" are tags which must all be present on a GameObject's TagSet in order for the GameObject to not be excluded by Filter(GameObject). Similarly, "exclude tags" are tags which, if any appear in a GameObject's TagSet, that GameObject will be excluded by Filter(GameObject).

Protected Functions

virtual void Start ( )

Member Functions

Checks whether a GameObject should be excluded ("filtered out") based on the presence or absence of tags in a TagSet on the GameObject.
Parameters
gameObject
The GameObject to check for tags.
Returns
True if the GameObject should be included, false if it should be excluded ("filtered out").
Sets the list of "require tags" in a dynamically instantiated TagSetFilter.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets the list of "exclude tags" in a dynamically instantiated TagSetFilter.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.