# Editor.Widget.GetContext

```csharp
T GetContext(string key, T defaultIfMissing = null)
```

Find a context on this widget. If not found, look at the parent. If not found, look at the parent.
This is useful for passing information down to child widgets without any effort.

### Parameters

- `key` (`string`)
- `defaultIfMissing` (`T`), default `null`

### Returns

`T`

Declared in [Editor.Widget](/api/Editor.Widget).
Assembly: `Sandbox.Tools`.
