> For the complete documentation index, see [llms.txt](https://malbersanimations.gitbook.io/animal-controller/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://malbersanimations.gitbook.io/animal-controller/scriptable-architecture/scriptables/tags.md).

# 🎫Tags

## Overview

The **Tags** component allows gameobjects to have multiple tags.. instead of one.

It uses the **Tag** scriptable assets with Integer ID values.

<figure><img src="/files/kWQcQaI7RIzEkazUw792" alt=""><figcaption></figcaption></figure>

You can create your own tags by the Create Menu:

*Create→Malbers→Scriptables→Tag*

![](/files/-M75mXSD_JiwlIYIF8vU)

The ID for a Tag  is created automatically using the method **`GetHashCode()`.  Which means Tags IDs are Case sensitive**

For example, the ID for the **"**&#x43;ompanion" tag is the HashCode \[-780357772]&#x20;

![](/files/-M75n1hFbmhj5CUjCj8J)

{% hint style="success" %}
To know if a **gameObject** or a **transform** has a **Tag(s)** you can use the Extension methods:
{% endhint %}

```csharp
if (transform.HasMalbersTag(myTag))
{
   //Do your thing
}

//OR

if (gameobject.HasMalbersTag(myTag))
{
   //Do your thing
}

//OR

if (transform.HasMalbersTag(myTag1, myTag2))
{
   //Do your thing
}

```

## Methods & Properties

### `static List<Tags> TagsHolders`

> Returns a List of all objects that use the Tags component. You can access from everywhere like this:
>
> **`Tags.TagsHolders`**

### `static List GambeObjectbyTag(Tag tag)`

> Returns a List of all gameobjects in the current scene that have a **tag**. You can access from everywhere like this:
>
> **`Tags.GambeObjectbyTag(myTag)`**

### `static List GambeObjectbyTag(int tag)`

> same as `static List GambeObjectbyTag(Tag tag)` but uses the int value of the tag

### `bool HasTag(Tag tag)`

> Check if this component has a tag.&#x20;

###
