# GetCustomRowHeight(int, TreeViewItem<TIdentifier>)

> Override to control individual row heights.

## Definition

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

## GetCustomRowHeight(int, TreeViewItem\<T>)

```csharp
protected virtual float GetCustomRowHeight(int row, TreeViewItem<TIdentifier> item)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Row index.**** (\[TreeViewItem\<T>]\(/engine/6000.5/script-reference/unityeditor/imgui/controls/treeviewitem)): Item for given row.

### Returns

| Type                                                          | Description    |
| ------------------------------------------------------------- | -------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | Height of row. |

### Remarks

Override this method if custom row rects are needed for each row in the TreeView, for example if you have content that can vary in height depending on the content. This method is called internally by the TreeView for each row after BuildRows have been called. If this method is not overridden then the `rowHeight` property is used for all rows.

This method should only be overridden if row heights can differ; if all rows have same height then use the `rowHeight` property as this is more performant for large data sets.

The heights returned by this method are cached. To update the cache call [TreeView\<TIdentifier>.RefreshCustomRowHeights()](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/refreshcustomrowheights.md).
