# SetNameSmart(Object, string)

> Sets the name of an Object.

## Definition

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

```csharp
public static void SetNameSmart(Object obj, string name)
```

### Parameters

**** (\[Object]\(/engine/6000.7/script-reference/unityengine/object)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;

### Remarks

If the object is an Asset, renames the asset and file names to match the object.
