XUniWindowController
XUniWindowController is a Unity native plugin that provides comprehensive standalone application window control for Windows and macOS builds.
It allows you to control window transparency, click-through, topmost/bottommost z-order, maximize, file drop, native file dialogs, and multi-monitor window fitting — all from C# scripts through a simple Unity component.
Features
- Window Transparency — Alpha blending or ColorKey-based transparency
- Click-Through — Make the window ignore mouse events
- Z-Order Control — Set window topmost, bottommost, or normal
- Maximize / Restore — Themed maximize and restore
- Borderless Mode — Hide the title bar and border
- Window Position & Size — Get/set window position and size
- Multi-Monitor Support — Fit window to any connected display
- File Drop — Receive file paths from drag-and-drop
- Native File Dialogs — Open and save file dialogs (Windows/macOS native)
- Drag Move — Drag the window by any UI element
Requirements
- Unity 2022.3 or later
- Windows or macOS standalone build target
Installation
Via Package Manager
- Open Window > Package Manager
- Click the + button > Add package from git URL
- Enter the repository URL
Via disk (local package)
- Copy the
com.lrss3.xuniwindowcontrollerfolder to your project'sPackages/directory - Package Manager will automatically pick it up
Getting Started
- Add a UniWindowController component to any GameObject in your scene (or use the prefab from samples)
- Configure the Inspector properties:
- Is Transparent — Enable window transparency
- Is Topmost — Keep window on top
- Hit Test Type — Choose opacity-based or raycast-based click-through detection
- Call methods or toggle properties at runtime:
var winc = UniWindowController.current;
winc.isTransparent = true; // Enable transparency
winc.isTopmost = true; // Keep on top
winc.isClickThrough = false; // Disable click-through
Samples
The package includes 5 sample scenes:
| Sample | Description |
|---|---|
| Menu | Navigation menu for browsing all samples |
| SimpleSample | Minimal window control setup |
| UiSample | Full UI with toggles, sliders, dropdowns for all features |
| Fullscreen | Fullscreen mode + right-click context menu + 3D scene |
| FileDialog | Native open/save file dialog demonstration |
Import samples via Package Manager > XUniWindowController > Samples.
How It Works
On Windows, the plugin uses LibUniWinC.dll (C++ Win32 API) to call:
SetWindowLong— modify window stylesSetWindowPos— control z-order and positionDwmExtendFrameIntoClientArea— DWM transparencySetLayeredWindowAttributes— layered window transparencyDragAcceptFiles/ window subclassing — file drop handling
On macOS, the plugin uses LibUniWinC.bundle (Swift / Cocoa) to call:
NSWindow.styleMask— borderless modeNSWindow.level— z-order controlNSWindow.isOpaque/backgroundColor— transparencyNSDraggingDestinationprotocol — file dropNSOpenPanel/NSSavePanel— native dialogs
License
This package is based on UniWindowController by Kirurobo, licensed under the MIT License.
Description
Languages
C#
100%