# IsValid(int)

> Returns true if the id provided is a valid layer id.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static bool IsValid(int id)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The unique id of a layer.

### Returns

| Type                                                          | Description                                               |
| ------------------------------------------------------------- | --------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the id provided is valid and assigned to a layer. |
