Class TagCatalog
The catalog storing tags.
Namespace: UnityEngine.GameFoundation
Syntax
public class TagCatalog
Methods
Contains(Tag)
Tells whether or not this catalog contains the specified Tag.
Declaration
public bool Contains(Tag tag)
Parameters
| Type | Name | Description |
|---|---|---|
| Tag | tag | The Tag to find. |
Returns
| Type | Description |
|---|---|
| Boolean |
|
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If the |
Find(String)
Looks for a Tag by its key.
Declaration
public Tag Find(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key |
Returns
| Type | Description |
|---|---|
| Tag | The requested Tag instance, or nullif not found. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If the |
GetTags(ICollection<Tag>, Boolean)
Fills in the given target collection with all the Tag instances of this
catalog, and returns their count.
The target collection is cleared before being populated.
Declaration
public int GetTags(ICollection<Tag> target = null, bool clearTarget = true)
Parameters
| Type | Name | Description |
|---|---|---|
| ICollection<Tag> | target | The target container of all the Tag instances. |
| Boolean | clearTarget | If |
Returns
| Type | Description |
|---|---|
| Int32 | The number of Tag instances found. |