# GetStyle(string)

> Get a named GUIStyle.

## Definition

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

```csharp
public GUIStyle GetStyle(string styleName)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;

### Returns

| Type                                                                | Description |
| ------------------------------------------------------------------- | ----------- |
| [GUIStyle](/engine/6000.7/script-reference/unityengine/guistyle.md) |             |

### Examples

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    bool b;

    void OnGUI()
    {
        b = GUILayout.Toggle(b, "A toggle button", GUI.skin.GetStyle("Button"));
    }
}
```
