# Sandbox.Npcs.Layers.SensesLayer.FindNearestVisible

## Overload 1

```csharp
GameObject FindNearestVisible(string tag)
```

Find the nearest visible object with a specific tag. May perform visibility traces for unchecked candidates.

### Parameters

- `tag` (`string`)

### Returns

`GameObject`

## Overload 2

```csharp
GameObject FindNearestVisible(Disposition disposition)
```

Find the nearest visible entity this NPC regards with the given disposition
(e.g. the nearest thing it's afraid of). May perform visibility traces for unchecked candidates.

### Parameters

- `disposition` (`Disposition`)

### Returns

`GameObject`

Declared in [Sandbox.Npcs.Layers.SensesLayer](/api/Sandbox.Npcs.Layers.SensesLayer).
Assembly: `Sandbox.Engine`.
