# GetCurrentGroupName()

> Get the name that will be shown in the UI for the current undo group.

## Definition

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

```csharp
public static string GetCurrentGroupName()
```

### Returns

| Type                                                           | Description                                                                 |
| -------------------------------------------------------------- | --------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | Name of the current group or an empty string if the current group is empty. |

### Remarks

By default, this name is inferred from the actions in the group. To set the name manually, use [Undo.SetCurrentGroupName](/engine/6000.7/script-reference/unityeditor/undo/setcurrentgroupname.md).
