# SetIsVisible(bool)

> Sets whether the window is visible.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Windowing](/engine/6000.7/script-reference/unityengine/windowing.md)
* **Assembly:** UnityEngine.WindowingModule

```csharp
public AsyncOperation SetIsVisible(bool isVisible)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): True to show the window, false to hide it.

### Returns

| Type                                                                            | Description                                                                                                                    |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| [AsyncOperation](/engine/6000.7/script-reference/unityengine/asyncoperation.md) | An [AsyncOperation](/engine/6000.7/script-reference/unityengine/asyncoperation.md) that represents the asynchronous operation. |

### Remarks

Hiding a window doesn't destroy it or release its resources. The window keeps its title, position, and resolution, and you can show it again later. Use [GameWindow.IsVisible](/engine/6000.7/script-reference/unityengine/windowing/gamewindow/isvisible.md) to query the current value.

Note that if you hide every window, the operating system might suspend the application and it stops running its update loop. Scripts can't show a window again while the application is suspended, so keep at least one window visible if you rely on script execution to restore the others.

### Examples

```csharp
using UnityEngine;
using UnityEngine.Windowing;

public class SetWindowVisibleExample : MonoBehaviour
{
    void Start()
    {
        var window = GameWindow.Main;
        var op = window.SetIsVisible(false);

        op.completed += (AsyncOperation o) =>
        {
            // Triggers when the visibility change is complete
            Debug.Log($"Window visibility set to: {window.IsVisible()}");
        };
    }
}
```
