> 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;

###


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://malbersanimations.gitbook.io/animal-controller/scriptable-architecture/scriptables/tags.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
