# Contains

> Returns whether an object is contained in the current selection.

## Definition

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

## Contains(EntityId)

Returns whether an object is contained in the current selection.

```csharp
public static bool Contains(EntityId entityId)
```

### Parameters

**** (\[EntityId]\(/engine/6000.7/script-reference/unityengine/entityid)):&#x20;

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

## Contains(int)

Returns whether an object is contained in the current selection.

> **Warning:**
>
> **Removed.** Use Contains() with EntityId instead.

```csharp
public static bool Contains(int instanceID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)):&#x20;

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

## Contains(Object)

Returns whether an object is contained in the current selection.

```csharp
public static bool Contains(Object obj)
```

### Parameters

**** (\[Object]\(/engine/6000.7/script-reference/unityengine/object)):&#x20;

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |
