# Sandbox.ComponentList.GetInAncestorsOrSelf

```csharp
T GetInAncestorsOrSelf(bool includeDisabled = False)
```

Find component on this gameobject's ancestors or on self

### Parameters

- `includeDisabled` (`bool`), default `False`

### Returns

`T`

Declared in [Sandbox.ComponentList](/api/Sandbox.ComponentList).
Assembly: `Sandbox.Engine`.
