2024-12-12.12-18-20.mp4
UPDATE: Now with active windows collide physics sample
2024-12-09.12-14-33.mp4
A transparent window interactive example project based on Unity URP pipeline, suitable for desktop pets, desktop gadgets, etc.
Compatible with Windows Build
Unity 2021.3.9f1, using Universal RP 12.1.7
Should be compatible with newer versions, but newer versions of the URP pipeline may require switching RendererFeature
Download this project and open it with Unity Hub
Does not use UnityPackage, see Notes for reasons
-
Post-processing, shaders, Physical system... basically everything Unity can do
-
Transparent background top-level display window
-
Switch window mouse penetration/interactive state
-
Collide with active windows!
-
Hide taskbar icon at runtime
-
Show system tray icon and customizable right-click menu at runtime
-
For higher versions (14+) of the URP pipeline:
The Blit RendererFeature used in the project may no longer be applicable, consider switching to the built-in Full Screen Pass Renderer Feature of this pipeline
-
The project includes a localized Universal RP Package
Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/UberPost.shader
Since the UberPost.shader in Universal RP has been processed to output actual transparency, it has been localized, reference link
If you want to use it in an existing project, please note this
-
Make sure that the Collider Layer of the active window is not included in the LayerMask for interaction detection, or the window cannot be dragged
-
Not suitable for HDR
-
Calls User32.dll, currently only suitable for Windows platform builds
-
Performance requirements may be high, after all, this is basically a Unity game running in the background
-
System tray logic from rocksdanister/rePaper: Desktop that changes based on weather & time
-
Some logic from kirurobo/UniWindowController: Makes your Unity window transparent and allows you to drop files
-
DLL call logic reference [SOLVED!] Windows: Transparent window with opaque contents (LWA_COLORKEY)? - Unity Engine - Unity Discussions
-
Blit RendererFeature from Cyanilux : https://github.com/Cyanilux/URP_BlitRenderFeature