# DisablePicking

> Disables picking on a GameObject, or an Array of GameObjects, and their descendants.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.5/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## DisablePicking(GameObject, bool)

Disables picking on a GameObject, or an Array of GameObjects, and their descendants.

```csharp
public void DisablePicking(GameObject gameObject, bool includeDescendants)
```

### Parameters

**** (\[GameObject]\(/engine/6000.5/script-reference/unityengine/gameobject)): GameObject on which to disable picking.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to include descendants.

## DisablePicking(Scene)

Disables picking on all GameObjects in a Scene.

```csharp
public void DisablePicking(Scene scene)
```

### Parameters

**** (\[Scene]\(/engine/6000.5/script-reference/unityengine/scenemanagement/scene)): Scene containing GameObjects on which to disable picking.

## DisablePicking(GameObject\[], bool)

Disables picking on a GameObject, or an Array of GameObjects, and their descendants.

```csharp
public void DisablePicking(GameObject[] gameObjects, bool includeDescendants)
```

### Parameters

**** (\[GameObject\[]]\(/engine/6000.5/script-reference/unityengine/gameobject)): Array of GameObjects on which to disable picking.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to include descendants.
