class GameTags : ITagSet

robot_2Generated
code_blocksInput

Description

The GameTags class in the Sandbox namespace provides functionality for managing entity tags. Tags are strings that can be set and checked on any entity. Internally, these strings are tokenized and networked, making them available client-side as well.

Members

Instance Methods

Member NameSummary
TryGetAll()Returns all the tags this object has.
TryGetAll(bool includeAncestors)Returns all the tags this object has.
Has(string tag)Returns true if this object (or its parents) has the given tag.
Has(string tag, bool includeAncestors)Returns true if this object has the given tag.
HasAny(HashSet<string> tagList)Returns true if this object has one or more tags from the given tag list.
Add(string tag)Try to add the tag to this object.
Add(string[] tags)Adds multiple tags. Calls GameTags.Add(string) for each tag.
Remove(string tag)Try to remove the tag from this entity.
RemoveAll()Remove all tags.
Flush()Obsolete. No need to call this now, tags are set immediately.
GetTokens()Returns a list of integers representing the tags. These are used internally by the engine.