---
title: GetCellRect(int)
product: Unity Editor
version: '6000.7'
latest_version: '7000.0'
status: This page documents version 6000.7. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/6000.7/script-reference/unityeditor/imgui/controls/treeview1/rowguiargs/getcellrect
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityeditor/imgui/controls/treeview1/rowguiargs/getcellrect.md
last_updated: 2026-09-14
generated_at: 2026-11-09T03:21:03.444Z
locale: en-us
---

# GetCellRect(int)

> If using a MultiColumnHeader for the TreeView this method can be used to get the cell rects of a row using the visible columns of the MultiColumnHeader.

## Definition

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

```csharp
public Rect GetCellRect(int visibleColumnIndex)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index into the list of visible columns of the multi column header.

### Returns

| Type                                                        | Description                                                                                    |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [Rect](/engine/6000.7/script-reference/unityengine/rect.md) | Cell rect defined by the intersection between the row rect and the rect of the visible column. |

### Remarks

Note the returned cell rect is affected by the [TreeView\<TIdentifier>.cellMargin](/engine/6000.7/script-reference/unityeditor/imgui/controls/treeview1/cellmargin.md) value.

Additional Resources: [MultiColumnHeader](/engine/6000.7/script-reference/unityeditor/imgui/controls/multicolumnheader.md), [TreeView\<TIdentifier>.RowGUI](/engine/6000.7/script-reference/unityeditor/imgui/controls/treeview1/rowgui.md), [TreeView\<TIdentifier>.RowGUIArgs.GetNumVisibleColumns](/engine/6000.7/script-reference/unityeditor/imgui/controls/treeview1/rowguiargs/getnumvisiblecolumns.md), [TreeView\<TIdentifier>.RowGUIArgs.GetColumn](/engine/6000.7/script-reference/unityeditor/imgui/controls/treeview1/rowguiargs/getcolumn.md).
