# RenameProfile(string, string)

> Renames the ID of a profile.

## Definition

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

```csharp
void RenameProfile(string profileId, string newProfileId)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): ID of existing profile.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): New ID for profile.

### Remarks

Changes the ID of the

Throws `ArgumentNullException` if `profileId` or `newProfileId` is null. Throws `ArgumentException` if `profileId` is not available. Throws `ArgumentException` if profile is read-only, i.e. [IShortcutManager.IsProfileReadOnly](/engine/6000.3/script-reference/unityeditor/shortcutmanagement/ishortcutmanager/isprofilereadonly.md) returns `true` for `profileId`. Throws `ArgumentException` if `newProfileId` is already available, i.e. when [IShortcutManager.GetAvailableProfileIds](/engine/6000.3/script-reference/unityeditor/shortcutmanagement/ishortcutmanager/getavailableprofileids.md) contains `newProfileId`. Throws `ArgumentException` if newProfileId is invalid.
