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 Methods

Start ()
Signature
virtual void Oculus.Interaction.TagSet.Start()
Returns
void

Methods

AddTag ( tag )
Adds a new string to the tag set.
Signature
void Oculus.Interaction.TagSet.AddTag(string tag)
Parameters
tag: string  The string to be added as a new tag in the set
Returns
void
ContainsTag ( tag )
Checks whether the tag set contains the specified tag .
Signature
bool Oculus.Interaction.TagSet.ContainsTag(string tag)
Parameters
tag: string  The string to check for within the tag set
Returns
bool  True if the set contains tag , false otherwise
InjectOptionalTags ( tags )
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.
Signature
void Oculus.Interaction.TagSet.InjectOptionalTags(List< string > tags)
Parameters
tags: List< string >
Returns
void
RemoveTag ( tag )
Removes a string from the tag set.
Signature
void Oculus.Interaction.TagSet.RemoveTag(string tag)
Parameters
tag: string  The string to be removed as a tag from the set
Returns
void