# Attacher

> Helper object that attaches a visual element next to its target, regarless of their respective location in the visual tree hierarchy.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.Experimental.GraphView](/engine/6000.3/script-reference/unityeditor/experimental/graphview.md)
* **Assembly:** UnityEditor

```csharp
public class Attacher
```

## Remarks

The Attacher will monitor the position of the target and move the attached element accordingly.

## Constructors

| Constructor                                                                                                                                                                                            | Description                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| [Attacher(UnityEngine.UIElements.VisualElement,UnityEngine.UIElements.VisualElement,UnityEngine.SpriteAlignment)](/engine/6000.3/script-reference/unityeditor/experimental/graphview/attacher/ctor.md) | Attaches a visual element next to its target, regarless of their respective locations in the visual tree hierarchy. |

## Properties

| Property                                                                                              | Description                                                       |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [alignment](/engine/6000.3/script-reference/unityeditor/experimental/graphview/attacher/alignment.md) | Relative alignment between the attached element and the target.   |
| [distance](/engine/6000.3/script-reference/unityeditor/experimental/graphview/attacher/distance.md)   | The distance between the attached element and the target.         |
| [element](/engine/6000.3/script-reference/unityeditor/experimental/graphview/attacher/element.md)     | The element that is attached to the target element.               |
| [offset](/engine/6000.3/script-reference/unityeditor/experimental/graphview/attacher/offset.md)       | An absolute offset added to the element position after placement. |
| [target](/engine/6000.3/script-reference/unityeditor/experimental/graphview/attacher/target.md)       | The target element.                                               |

## Methods

| Method                                                                                              | Description                                                                                    |
| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [Detach](/engine/6000.3/script-reference/unityeditor/experimental/graphview/attacher/detach.md)     | Stop monitoring the target element and postioning the attached element.                        |
| [Reattach](/engine/6000.3/script-reference/unityeditor/experimental/graphview/attacher/reattach.md) | Starts monitoring target element position changes and places the attached element accordingly. |
