Suggest a change
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Close
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Close
Declaration
public bool IsVisible();
Returns
bool
True if the window is visible, false otherwise.
Description
Checks if the window is visible.
A window is visible when the windowing system displays it. A visible window can still be fully covered by another window. Use GameWindow.SetIsVisible to show or hide the window.
using UnityEngine;
using UnityEngine.Windowing;
public class IsWindowVisibleExample : MonoBehaviour
{
void Start()
{
var window = GameWindow.Main;
bool visible = window.IsVisible();
Debug.Log($"Is window visible: {visible}");
}
}