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").
Checks whether the required tag set contains the specified tag .
Parameters
tag
The string to check for within the required tag set
Returns
True if the required set contains tag , false otherwise
Adds a new string to the required tag set.
Parameters
tag
The string to be added as a new tag in the required set
Removes a string from the required tag set.
Parameters
tag
The string to be removed as a tag from the required set
Checks whether the excluded tag set contains the specified tag .
Parameters
tag
The string to check for within the excluded tag set
Returns
True if the excluded set contains tag , false otherwise
Adds a new string to the excluded tag set.
Parameters
tag
The string to be added as a new tag in the excluded set
Removes a string from the excluded tag set.
Parameters
tag
The string to be removed as a tag from the excluded set
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.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon