Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

GameWindow.IsResizable

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

Cancel

Declaration

public bool IsResizable();

Returns

bool True if the window can be resized manually, false otherwise.

Description

Checks if the window can be resized manually.

The initial value comes from the resizable setting in GameWindowCreationSettings. Use GameWindow.SetIsResizable to change it at runtime.

On QNX, and for a full-screen window on any platform, GameWindow.SetIsResizable has no effect, so this method keeps returning the value the window was created with.

using UnityEngine;
using UnityEngine.Windowing;

public class IsWindowResizableExample : MonoBehaviour { void Start() { var window = GameWindow.Main; bool resizable = window.IsResizable(); Debug.Log($"Is window resizable: {resizable}"); } }