# BeginRename

> Shows the rename overlay for a TreeViewItem.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.IMGUI.Controls](/engine/6000.5/script-reference/unityeditor/imgui/controls.md)
* **Assembly:** UnityEditor.CoreModule

## BeginRename(TreeViewItem)

Shows the rename overlay for a TreeViewItem.

> **Warning:**
>
> **Removed.** TreeView is now deprecated. You can likely now use TreeView\\\<int\\> instead and not think more about it. But if you were using that identifier to store InstanceID data, you should instead opt to upgrade your TreeViews to use TreeView\\\<InstanceID\\> to get the proper typing.

```csharp
public bool BeginRename(TreeViewItem item)
```

### Parameters

**** (\[TreeViewItem]\(/engine/6000.5/script-reference/unityeditor/imgui/controls/treeviewitem)): Item to rename.

### Returns

| Type                                                          | Description                                                                         |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if renaming was started. Returns false if renaming was already active. |

### Remarks

This renames the [displayName](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeviewitem1/displayname.md) string.

## BeginRename(TreeViewItem, float)

Shows the rename overlay for a TreeViewItem.

> **Warning:**
>
> **Removed.** TreeView is now deprecated. You can likely now use TreeView\\\<int\\> instead and not think more about it. But if you were using that identifier to store InstanceID data, you should instead opt to upgrade your TreeViews to use TreeView\\\<InstanceID\\> to get the proper typing.

```csharp
public bool BeginRename(TreeViewItem item, float delay)
```

### Parameters

**** (\[TreeViewItem]\(/engine/6000.5/script-reference/unityeditor/imgui/controls/treeviewitem)): Item to rename.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Delay in seconds until the rename overlay shows.

### Returns

| Type                                                          | Description                                                                         |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if renaming was started. Returns false if renaming was already active. |

### Remarks

This renames the [displayName](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeviewitem1/displayname.md) string.
