How to make a Unity game window transparent and click-through?
Hi everyone! I’m new to Unity, and I decided to start with a game a like Rusty’s Retirement.
I ran into problems almost immediately and got stuck at the very first stage. I can’t figure out how to make Unity 6.3 run in a transparent window mode with the ability to click through the game window (so mouse input passes to the desktop behind it).
I’ve tried looking up different guides online, but all of them seem to be made for older versions of Unity. I also tried using Desktopia, but in Unity 6.3 the setting that the guide says must be disabled simply doesn’t exist anymore.
My questions:
Is it possible to achieve a transparent, click-through game window in Unity 6.3? If yes, how?
If it’s not possible in this version, would it be easier to downgrade Unity?
If so, which Unity version would you recommend for this kind of functionality?
Yes because it’s non-trivial choice for a starter. The solutions are wonky, OS-dependent, and require you to interface with the Win32 API (on Windows).
Due to these games being hyped and probably tutorials too, this often gets asked as users run into issues. You can use the search to see if you can find any threads with solutions on here.
From Desktopia’s readme:
If your transparent window does not work:
Got to to Project Settings > Resolution and Presentation
Uncheck “Use DXGI Flip Model Swapchain for D3D11”
Unity defaults to DX12 since 6.1 so you’d have to first switch to DX11 in Project Settings / Player and restart the editor. Then that setting may appear if it still exists. I think that’s mainly what changed and why users started having trouble since Unity 6.
If it still won’t work find a tutorial which explains how to do so, and use the major/minor version the author is using. Ie if they use 2022.3.44f1 then get the latest release of 2022.3.
Though honestly for a first project you’ll better start off with something that can be done “normally” ie without requiring you to utilize native OS API calls. You can later take any game and put it semi-transparent on the desktop - focus on the game first, technical hassles later.