# LinkButton

> Make a clickable link label.

## Definition

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

## LinkButton(string, GUILayoutOption\[])

Make a clickable link label.

```csharp
public static bool LinkButton(string label, params GUILayoutOption[] options)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Label of the link.**** (\[GUILayoutOption\[]]\(/engine/6000.7/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the `style`.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.7/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.7/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.7/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.7/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.7/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.7/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.7/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.7/script-reference/unityengine/guilayout/expandheight.md).

### 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 EditorGUILayoutLinkButton : EditorWindow
{
    [MenuItem("Examples/EditorGUILayoutLinkButton")]
    static void Init()
    {
        var window = GetWindow<EditorGUILayoutLinkButton>();
        window.Show();
    }

    void OnGUI()
    {
        if (EditorGUILayout.LinkButton("Link Button"))
            Debug.Log("Clicked");
    }
}
```

## LinkButton(GUIContent, GUILayoutOption\[])

Make a clickable link label.

```csharp
public static bool LinkButton(GUIContent label, params GUILayoutOption[] options)
```

### Parameters

**** (\[GUIContent]\(/engine/6000.7/script-reference/unityengine/guicontent)): Label of the link.**** (\[GUILayoutOption\[]]\(/engine/6000.7/script-reference/unityengine/guilayoutoption)): An optional list of layout options that specify extra layout properties. Any values passed in here will override settings defined by the `style`.\
&#x20;Additional Resources: [GUILayout.Width](/engine/6000.7/script-reference/unityengine/guilayout/width.md), [GUILayout.Height](/engine/6000.7/script-reference/unityengine/guilayout/height.md), [GUILayout.MinWidth](/engine/6000.7/script-reference/unityengine/guilayout/minwidth.md), [GUILayout.MaxWidth](/engine/6000.7/script-reference/unityengine/guilayout/maxwidth.md), [GUILayout.MinHeight](/engine/6000.7/script-reference/unityengine/guilayout/minheight.md), [GUILayout.MaxHeight](/engine/6000.7/script-reference/unityengine/guilayout/maxheight.md), [GUILayout.ExpandWidth](/engine/6000.7/script-reference/unityengine/guilayout/expandwidth.md), [GUILayout.ExpandHeight](/engine/6000.7/script-reference/unityengine/guilayout/expandheight.md).

### 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 EditorGUILayoutLinkButton : EditorWindow
{
    [MenuItem("Examples/EditorGUILayoutLinkButton")]
    static void Init()
    {
        var window = GetWindow<EditorGUILayoutLinkButton>();
        window.Show();
    }

    void OnGUI()
    {
        if (EditorGUILayout.LinkButton("Link Button"))
            Debug.Log("Clicked");
    }
}
```
