# LinkButton

> Make a clickable link label.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## LinkButton(Rect, string)

Make a clickable link label.

```csharp
public static bool LinkButton(Rect position, string label)
```

### Parameters

**** (\[Rect]\(/engine/6000.0/script-reference/unityengine/rect)): Rectangle on the screen to use for the control. The underline is done with the bottom border so set the size accordingly.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Label of the link.

### Returns

| Type                                                          | Description                         |
| ------------------------------------------------------------- | ----------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | true when the user clicks the link. |

### Remarks

The label has an hyperlink style and returns true when clicked.

### Examples

```csharp
using UnityEditor;
using UnityEngine;


class EditorGUILinkButton : EditorWindow
{
    [MenuItem("Examples/EditorGUILinkButton")]
    static void Init()
    {
        var window = GetWindow<EditorGUILinkButton>();
        window.Show();
    }

    void OnGUI()
    {
        var label = new GUIContent("Link Button");
        var size = EditorStyles.linkLabel.CalcSize(label);
        if (EditorGUI.LinkButton(new Rect(50, 50, size.x, size.y), label))
            Debug.Log("Clicked");
    }
}
```

## LinkButton(Rect, GUIContent)

Make a clickable link label.

```csharp
public static bool LinkButton(Rect position, GUIContent label)
```

### Parameters

**** (\[Rect]\(/engine/6000.0/script-reference/unityengine/rect)): Rectangle on the screen to use for the control. The underline is done with the bottom border so set the size accordingly.**** (\[GUIContent]\(/engine/6000.0/script-reference/unityengine/guicontent)): Label of the link.

### Returns

| Type                                                          | Description                         |
| ------------------------------------------------------------- | ----------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | true when the user clicks the link. |

### Remarks

The label has an hyperlink style and returns true when clicked.

### Examples

```csharp
using UnityEditor;
using UnityEngine;


class EditorGUILinkButton : EditorWindow
{
    [MenuItem("Examples/EditorGUILinkButton")]
    static void Init()
    {
        var window = GetWindow<EditorGUILinkButton>();
        window.Show();
    }

    void OnGUI()
    {
        var label = new GUIContent("Link Button");
        var size = EditorStyles.linkLabel.CalcSize(label);
        if (EditorGUI.LinkButton(new Rect(50, 50, size.x, size.y), label))
            Debug.Log("Clicked");
    }
}
```
