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

TagSet Class

Extends MonoBehaviour
A set of string tags for use in filtering.
At most one TagSet should ever be present on a single GameObject.
The most common use of tag filtering in the Interaction SDK is constraining which interactors can interact with which interactables by using the Interactor<TInteractor, TInteractable>.InteractableFilters and Interactable<TInteractor, TInteractable>.InteractorFilters. Any criteria which can be expressed in an IGameObjectFilter can be used for filtering, including string-based techniques leveraging TagSet, such as in TagSetFilter.

Protected Functions

virtual void Start ( )

Member Functions

Checks whether the tag set contains the specified tag .
Parameters
tag
The string to check for within the tag set
Returns
True if the set contains tag , false otherwise
Adds a new string to the tag set.
Parameters
tag
The string to be added as a new tag in the set
Removes a string from the tag set.
Parameters
tag
The string to be removed as a tag from the set
Sets the list of tags in a dynamically instantiated TagSet.
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