# Editor.Widget.GetAncestor

```csharp
T GetAncestor()
```

Find the closest ancestor widget of type

### Returns

`T`

Declared in [Editor.Widget](/api/Editor.Widget).
Assembly: `Sandbox.Tools`.
