# GetSelection()

> Returns the list of TreeViewItem IDs that are currently selected.

## Definition

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

```csharp
public IList<TIdentifier> GetSelection()
```

### Returns

| Type                                                                                   | Description |
| -------------------------------------------------------------------------------------- | ----------- |
| [IList\<T>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1) |             |
