| Parameter | Description |
|---|---|
| isResizable | True to allow the window to be resized manually, false to prevent it. |
AsyncOperation An AsyncOperation that represents the asynchronous operation.
Sets whether the window can be resized manually.
This only controls manual resizing through the windowing system. You can always resize the window from a script with GameWindow.SetResolution. Use GameWindow.IsResizable to query the current value.
This method has no effect on QNX, where the platform doesn't support changing whether a window is resizable, or on a full-screen window on any platform. In both cases the returned operation still completes successfully, but the value that GameWindow.IsResizable reports doesn't change.
using UnityEngine; using UnityEngine.Windowing;
public class SetWindowResizableExample : MonoBehaviour { void Start() { var window = GameWindow.Main; var op = window.SetIsResizable(true);
op.completed += (AsyncOperation o) => { // Triggers when the resizability change is complete Debug.Log($"Window resizability set to: {window.IsResizable()}"); }; } }