# sortHierarchyByName

> Sorts the gameObject hierarchy by name.

## Definition

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

```csharp
public bool sortHierarchyByName { get; set; }
```

### Remarks

When enabled, gameObjects are sorted by alphabetical order within the hierarchy. Disable this property to preserve the hierarchy order defined in the imported file.
