# GetAllItemIds(IEnumerable<int>)

> Returns all item IDs that can be found in the tree, optionally specifying root IDs from where to start.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.5/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public virtual IEnumerable<int> GetAllItemIds(IEnumerable<int> rootIds = null)
```

### Parameters

**** (\[IEnumerable\<int>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)): Root IDs to start from. If null, will use the tree root ids.

### Returns

| Type                                                                                                 | Description                                                 |
| ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| [IEnumerable\<int>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1) | All items IDs in the tree, starting from the specified IDs. |
