# GetExistingTag(string)

> Get a handle to a existing defined tag.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.5/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static TagHandle GetExistingTag(string tagName)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the tag to get a handle to.

### Returns

| Type                                                                  | Description                           |
| --------------------------------------------------------------------- | ------------------------------------- |
| [TagHandle](/engine/6000.5/script-reference/unityengine/taghandle.md) | A new TagHandle for the existing tag. |

### Remarks

This method can only be used to get references to tags that were already defined. If you pass a tag name which is not already defined, it will throw an exception.

Additional Resources: [GameObject.CompareTag](/engine/6000.5/script-reference/unityengine/gameobject/comparetag.md).
