UGTK cat mascotUGTKengine within an engine Request access

UGTK / Toolkit / Utility Systems / Desktop Window Controls Completed

Utility Systems — UGTK

Desktop Window Controls

Summary

A set of small components to control the application window and lifecycle: quit the app, toggle fullscreen, and minimize the window on Windows Standalone (via Win32 ShowWindow).


Content


Modules Dependencies

This module has no hard UGTK dependencies.


Setup

Drop the ThreeButtons prefab under a Canvas — quit, fullscreen and minimize already wired:

Add whichever component you need to a GameObject: Mn_Quit, Mn_ToggleFullScreen, or Mn_WindowsMinimizer. On Mn_WindowsMinimizer you can enable Allow In Editor (otherwise minimizing is skipped in the editor) and Verbose Logs for diagnostics. Then bind the relevant method to a UI Button's OnClick.


How To Use

    quit.QuitApp();
    toggleFullScreen.ToggleFullscreen();
    windowsMinimizer.Minimize();

Good to know:


Testing Scene

Open WindowsDeviceManagentScene in the module's Debug/ folder.

What to do, in order:

  1. Toggle fullscreen from the inspector and read the reported mode.
  2. Press minimise — the editor window really does go to the taskbar.
  3. Build a player and repeat both.

Step 3 is the honest one. In the editor the Game view does not truly go fullscreen, so the value changes while the picture does not. Quit deliberately has no button: Application.Quit does nothing in the editor, is ignored by browsers on WebGL, and is grounds for rejection on iOS.

The demo scene is one corner of a window: minimise, restore and close, wired to the module. The recording is those three buttons and nothing more, on purpose - they act on the real window, and in the editor the real window is the editor. Minimise sends Unity itself to the taskbar, and close is exactly what it says it is.

So try them from a built player, as step 3 says, and keep them out of reach while you are editing.


Technical Info


© 2026 Marcello De Bonis. All rights reserved