# IsHidden

> Checks the hidden state of a GameObject and, optionally, its descendants.

## Definition

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

## IsHidden(GameObject, bool)

Checks the hidden state of a GameObject and, optionally, its descendants.

```csharp
public bool IsHidden(GameObject gameObject, bool includeDescendants = false)
```

### Parameters

**** (\[GameObject]\(/engine/6000.0/script-reference/unityengine/gameobject)): GameObject to check.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Specify true to check the GameObject and all its descendants. Set to false to check the GameObject.

### Returns

| Type                                                          | Description                                                                                                                                                                                                 |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | When includeDescendants is true, this method returns true when the GameObject and all its descendants are hidden. When includeDescendants is false, this method returns true when the GameObject is hidden. |

### Remarks

When includeDescendants is true, this method returns true when the GameObject and all its descendants are hidden. When includeDescendants is false, this method returns true when the GameObject is hidden.

## IsHidden(Scene)

Checks the hidden state of a GameObject and, optionally, its descendants.

```csharp
public bool IsHidden(Scene scene)
```

### Parameters

**** (\[Scene]\(/engine/6000.0/script-reference/unityengine/scenemanagement/scene)):&#x20;

### Returns

| Type                                                          | Description                                                                                                                                                                                                 |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | When includeDescendants is true, this method returns true when the GameObject and all its descendants are hidden. When includeDescendants is false, this method returns true when the GameObject is hidden. |

### Remarks

When includeDescendants is true, this method returns true when the GameObject and all its descendants are hidden. When includeDescendants is false, this method returns true when the GameObject is hidden.
