├── .gitignore ├── Assets ├── Packages.meta └── Packages │ ├── SingletonMonoBehaviour.meta │ ├── SingletonMonoBehaviour │ ├── SingletonMonoBehaviour.cs │ └── SingletonMonoBehaviour.cs.meta │ ├── TransparentWindowManager.meta │ └── TransparentWindowManager │ ├── FramelessWindowManager.cs │ ├── FramelessWindowManager.cs.meta │ ├── RandomRotator.cs │ ├── RandomRotator.cs.meta │ ├── TransparentMaterial.mat │ ├── TransparentMaterial.mat.meta │ ├── TransparentWindowManager.cs │ ├── TransparentWindowManager.cs.meta │ ├── TransparentWindowManager.unity │ ├── TransparentWindowManager.unity.meta │ ├── TransparentWindowManager2.cs │ └── TransparentWindowManager2.cs.meta ├── LICENSE ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset ├── README.md ├── TransparentWindowManager.unitypackage └── screenshot.png /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | Assets/AssetStoreTools* 7 | 8 | # Visual Studio cache directory 9 | .vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | *.opendb 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | *.pdb.meta 30 | 31 | # Unity3D Generated File On Crash Reports 32 | sysinfo.txt 33 | 34 | # Builds 35 | *.apk -------------------------------------------------------------------------------- /Assets/Packages.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8664a076cdcd6b43bbb7fc209758f71 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/SingletonMonoBehaviour.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b276fad65ae61dd45887e7530b321d64 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/SingletonMonoBehaviour/SingletonMonoBehaviour.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class SingletonMonoBehaviour : MonoBehaviour where T : SingletonMonoBehaviour 4 | { 5 | // NOTE: 6 | // There is a way to implemnt without SingletonMonoBehaviour.instanciated. 7 | // However, checking bool is faster than checking null. 8 | 9 | #region Field 10 | 11 | private static T instance; 12 | 13 | private static bool instanciated; 14 | 15 | #endregion Field 16 | 17 | #region Property 18 | 19 | public static T Instance 20 | { 21 | get 22 | { 23 | if (SingletonMonoBehaviour.instanciated) 24 | { 25 | return instance; 26 | } 27 | 28 | if (SingletonMonoBehaviour.instance == null) 29 | { 30 | SingletonMonoBehaviour.instance = (T)FindObjectOfType(typeof(T)); 31 | 32 | if (SingletonMonoBehaviour.instance == null) 33 | { 34 | GameObject gameObject = new GameObject(typeof(T).ToString()); 35 | SingletonMonoBehaviour.instance = gameObject.AddComponent(); 36 | } 37 | } 38 | 39 | SingletonMonoBehaviour.instanciated = true; 40 | 41 | return instance; 42 | } 43 | } 44 | 45 | public static bool Instanciated 46 | { 47 | get { return SingletonMonoBehaviour.instanciated; } 48 | } 49 | 50 | #endregion Property 51 | 52 | #region Method 53 | 54 | protected virtual void Awake() 55 | { 56 | // NOTE: 57 | // Make instance in Awake to make reference performance uniformly. 58 | 59 | if (SingletonMonoBehaviour.instance == null) 60 | { 61 | SingletonMonoBehaviour.instance = (T)this; 62 | SingletonMonoBehaviour.instanciated = true; 63 | } 64 | 65 | // NOTE: 66 | // If there is an instance already in the same scene, destroy this script. 67 | // But keep a GameObject(parent) instance is important 68 | // because some another scripts may attached to it. 69 | 70 | else if (SingletonMonoBehaviour.instance != this) 71 | { 72 | Debug.LogWarning("Singleton " + typeof(T) + " is already exists."); 73 | GameObject.Destroy(this); 74 | } 75 | } 76 | 77 | protected virtual void OnDestroy() 78 | { 79 | SingletonMonoBehaviour.instance = null; 80 | SingletonMonoBehaviour.instanciated = false; 81 | } 82 | 83 | #endregion Method 84 | } -------------------------------------------------------------------------------- /Assets/Packages/SingletonMonoBehaviour/SingletonMonoBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 330c774b0e33f594aa43f52c7b97c7bc 3 | timeCreated: 1528102246 4 | licenseType: Pro 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d57351b1623ce7438f5ccfe35720de5 3 | folderAsset: yes 4 | timeCreated: 1517985490 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager/FramelessWindowManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Runtime.InteropServices; 3 | using System; 4 | 5 | public class FramelessWindowManager : SingletonMonoBehaviour 6 | { 7 | // NOTE: 8 | // Unity has a command-line option "-popupwindow" to make the window frameless. 9 | 10 | #region DLL Import 11 | 12 | [DllImport("user32.dll")] 13 | private static extern IntPtr GetActiveWindow(); 14 | 15 | [DllImport("user32.dll")] 16 | private static extern int SetWindowLong(IntPtr hWnd, int nIndex, uint dwNewLong); 17 | 18 | [DllImport("user32.dll")] 19 | static extern bool SetWindowPos 20 | (IntPtr hWnd, int hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags); 21 | 22 | #endregion DLL Import 23 | 24 | #region Field 25 | 26 | public Rect windowRect; 27 | 28 | #endregion Field 29 | 30 | #region Method 31 | 32 | protected virtual void Start () 33 | { 34 | #if !UNITY_EDITOR && UNITY_STANDALONE_WIN 35 | 36 | const uint SWP_SHOWWINDOW = 0x0040; 37 | const int GWL_STYLE = -16; 38 | const uint WS_BORDER = 1; 39 | 40 | IntPtr windowHandle = GetActiveWindow(); 41 | SetWindowLong(windowHandle, GWL_STYLE, WS_BORDER); 42 | SetWindowPos(windowHandle, 43 | 0, 44 | (int)windowRect.x, 45 | (int)windowRect.y, 46 | (int)windowRect.width, 47 | (int)windowRect.height, 48 | SWP_SHOWWINDOW); 49 | 50 | #endif // !UNITY_EDITOR && UNITY_STANDALONE_WIN 51 | } 52 | 53 | #endregion Method 54 | } -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager/FramelessWindowManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ead4b466fae220040a3e8b8aba22b1a6 3 | timeCreated: 1480406278 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager/RandomRotator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class RandomRotator : MonoBehaviour 4 | { 5 | #region Field 6 | 7 | public float rotateSpeed = 100; 8 | 9 | private Quaternion targetRotation; 10 | 11 | private Quaternion previousQuaternion; 12 | 13 | #endregion Field 14 | 15 | #region Method 16 | 17 | protected virtual void Start() 18 | { 19 | this.targetRotation = Random.rotation; 20 | this.previousQuaternion = base.transform.rotation; 21 | } 22 | 23 | protected virtual void Update() 24 | { 25 | this.previousQuaternion = this.transform.rotation; 26 | 27 | this.transform.rotation = Quaternion.RotateTowards 28 | (base.transform.rotation, this.targetRotation, Time.deltaTime * this.rotateSpeed); 29 | 30 | if (base.transform.rotation == this.previousQuaternion 31 | || this.transform.rotation == this.targetRotation) 32 | { 33 | this.targetRotation = Random.rotation; 34 | } 35 | } 36 | 37 | #endregion Method 38 | } -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager/RandomRotator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21d09c9259ee4e545ab479b262edc634 3 | timeCreated: 1474369002 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager/TransparentMaterial.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/Assets/Packages/TransparentWindowManager/TransparentMaterial.mat -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager/TransparentMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f369703088380cb45b1d80b0b58d0e93 3 | timeCreated: 1480415722 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager/TransparentWindowManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | public class TransparentWindowManager : SingletonMonoBehaviour 5 | { 6 | #region Enum 7 | 8 | internal enum WindowCompositionAttribute 9 | { 10 | WCA_ACCENT_POLICY = 19 11 | } 12 | 13 | internal enum AccentState 14 | { 15 | ACCENT_DISABLED = 0, 16 | ACCENT_ENABLE_GRADIENT = 1, 17 | ACCENT_ENABLE_TRANSPARENTGRADIENT = 2, 18 | ACCENT_ENABLE_BLURBEHIND = 3, 19 | ACCENT_INVALID_STATE = 4 20 | } 21 | 22 | #endregion Enum 23 | 24 | #region Struct 25 | 26 | private struct MARGINS 27 | { 28 | public int cxLeftWidth; 29 | public int cxRightWidth; 30 | public int cyTopHeight; 31 | public int cyBottomHeight; 32 | } 33 | 34 | internal struct WindowCompositionAttributeData 35 | { 36 | public WindowCompositionAttribute Attribute; 37 | public IntPtr Data; 38 | public int SizeOfData; 39 | } 40 | 41 | internal struct AccentPolicy 42 | { 43 | public AccentState AccentState; 44 | public int AccentFlags; 45 | public int GradientColor; 46 | public int AnimationId; 47 | } 48 | 49 | #endregion Struct 50 | 51 | #region DLL Import 52 | 53 | [DllImport("user32.dll")] 54 | private static extern IntPtr GetActiveWindow(); 55 | 56 | [DllImport("user32.dll")] 57 | private static extern int SetWindowLong(IntPtr hWnd, int nIndex, uint dwNewLong); 58 | 59 | [DllImport("Dwmapi.dll")] 60 | private static extern uint DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MARGINS margins); 61 | 62 | #endregion DLL Import 63 | 64 | #region Method 65 | 66 | // CAUTION: 67 | // To control enable or disable, use Start method instead of Awake. 68 | 69 | protected virtual void Start() 70 | { 71 | #if !UNITY_EDITOR && UNITY_STANDALONE_WIN 72 | 73 | const int GWL_STYLE = -16; 74 | const uint WS_POPUP = 0x80000000; 75 | const uint WS_VISIBLE = 0x10000000; 76 | 77 | // NOTE: 78 | // https://msdn.microsoft.com/ja-jp/library/cc410861.aspx 79 | 80 | var windowHandle = GetActiveWindow(); 81 | 82 | // NOTE: 83 | // https://msdn.microsoft.com/ja-jp/library/cc411203.aspx 84 | // 85 | // "SetWindowLong" is used to update window parameter. 86 | // The arguments shows (target, parameter, value). 87 | 88 | SetWindowLong(windowHandle, GWL_STYLE, WS_POPUP | WS_VISIBLE); 89 | 90 | // NOTE: 91 | // https://msdn.microsoft.com/ja-jp/library/windows/desktop/aa969512(v=vs.85).aspx 92 | // https://msdn.microsoft.com/ja-jp/library/windows/desktop/bb773244(v=vs.85).aspx 93 | // 94 | // DwmExtendFrameIntoClientArea will spread the effects 95 | // which attached to window frame to contents area. 96 | // So if the frame is transparent, the contents area gets also transparent. 97 | // MARGINS is structure to set the spread range. 98 | // When set -1 to MARGIN, it means spread range is all of the contents area. 99 | 100 | MARGINS margins = new MARGINS() 101 | { 102 | cxLeftWidth = -1 103 | }; 104 | 105 | DwmExtendFrameIntoClientArea(windowHandle, ref margins); 106 | 107 | #endif // !UNITY_EDITOR && UNITY_STANDALONE_WIN 108 | } 109 | 110 | #endregion Method 111 | } -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager/TransparentWindowManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8c1cd9ac5a2abc419c38030330f3c97 3 | timeCreated: 1480407394 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager/TransparentWindowManager.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/Assets/Packages/TransparentWindowManager/TransparentWindowManager.unity -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager/TransparentWindowManager.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da0ac11f5124f0546bcf75d7cbe7927e 3 | timeCreated: 1477271773 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager/TransparentWindowManager2.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using UnityEngine; 4 | 5 | // CAUTION: 6 | // This is experiment to use latest API. 7 | // Result of this script gets blurry transparent window 8 | // or something wrong window even if set any parameters. 9 | 10 | public class TransparentWindowManager2 : MonoBehaviour 11 | { 12 | #region Struct 13 | 14 | [StructLayout(LayoutKind.Sequential)] 15 | internal struct WindowCompositionAttributeData 16 | { 17 | public WindowCompositionAttribute Attribute; 18 | public IntPtr Data; 19 | public int SizeOfData; 20 | } 21 | 22 | [StructLayout(LayoutKind.Sequential)] 23 | internal struct AccentPolicy 24 | { 25 | public AccentState AccentState; 26 | public int AccentFlags; 27 | public int GradientColor; 28 | public int AnimationId; 29 | } 30 | 31 | #endregion Struct 32 | 33 | #region Enum 34 | 35 | internal enum WindowCompositionAttribute 36 | { 37 | WCA_ACCENT_POLICY = 19 38 | } 39 | 40 | internal enum AccentState 41 | { 42 | ACCENT_DISABLED = 0, 43 | ACCENT_ENABLE_GRADIENT = 1, 44 | ACCENT_ENABLE_TRANSPARENTGRADIENT = 2, 45 | ACCENT_ENABLE_BLURBEHIND = 3, 46 | ACCENT_INVALID_STATE = 4 47 | } 48 | 49 | #endregion Enum 50 | 51 | #region Dll Import 52 | 53 | [DllImport("user32.dll")] 54 | private static extern IntPtr GetActiveWindow(); 55 | 56 | [DllImport("user32.dll")] 57 | internal static extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data); 58 | 59 | #endregion Dll Import 60 | 61 | #region Method 62 | 63 | protected virtual void Start() 64 | { 65 | #if !UNITY_EDITOR && UNITY_STANDALONE_WIN 66 | 67 | IntPtr windowHandle = GetActiveWindow(); 68 | 69 | var accent = new AccentPolicy(); 70 | var accentStructSize = Marshal.SizeOf(accent); 71 | accent.AccentState = AccentState.ACCENT_ENABLE_BLURBEHIND; 72 | accent.GradientColor = 0; 73 | 74 | var accentPtr = Marshal.AllocHGlobal(accentStructSize); 75 | Marshal.StructureToPtr(accent, accentPtr, false); 76 | 77 | var data = new WindowCompositionAttributeData(); 78 | data.Attribute = WindowCompositionAttribute.WCA_ACCENT_POLICY; 79 | data.SizeOfData = accentStructSize; 80 | data.Data = accentPtr; 81 | 82 | SetWindowCompositionAttribute(windowHandle, ref data); 83 | 84 | Marshal.FreeHGlobal(accentPtr); 85 | 86 | #endif // !UNITY_EDITOR && UNITY_STANDALONE_WIN 87 | } 88 | 89 | #endregion Method 90 | } -------------------------------------------------------------------------------- /Assets/Packages/TransparentWindowManager/TransparentWindowManager2.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f9f2e6c3ed2ea447aeda93adb8b9fa9 3 | timeCreated: 1480407394 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 XJINE 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.package-manager-ui": "1.9.11", 4 | "com.unity.modules.ai": "1.0.0", 5 | "com.unity.modules.animation": "1.0.0", 6 | "com.unity.modules.assetbundle": "1.0.0", 7 | "com.unity.modules.audio": "1.0.0", 8 | "com.unity.modules.cloth": "1.0.0", 9 | "com.unity.modules.director": "1.0.0", 10 | "com.unity.modules.imageconversion": "1.0.0", 11 | "com.unity.modules.imgui": "1.0.0", 12 | "com.unity.modules.jsonserialize": "1.0.0", 13 | "com.unity.modules.particlesystem": "1.0.0", 14 | "com.unity.modules.physics": "1.0.0", 15 | "com.unity.modules.physics2d": "1.0.0", 16 | "com.unity.modules.screencapture": "1.0.0", 17 | "com.unity.modules.terrain": "1.0.0", 18 | "com.unity.modules.terrainphysics": "1.0.0", 19 | "com.unity.modules.tilemap": "1.0.0", 20 | "com.unity.modules.ui": "1.0.0", 21 | "com.unity.modules.uielements": "1.0.0", 22 | "com.unity.modules.umbra": "1.0.0", 23 | "com.unity.modules.unityanalytics": "1.0.0", 24 | "com.unity.modules.unitywebrequest": "1.0.0", 25 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 26 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 27 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 28 | "com.unity.modules.unitywebrequestwww": "1.0.0", 29 | "com.unity.modules.vehicles": "1.0.0", 30 | "com.unity.modules.video": "1.0.0", 31 | "com.unity.modules.vr": "1.0.0", 32 | "com.unity.modules.wind": "1.0.0", 33 | "com.unity.modules.xr": "1.0.0" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/PresetManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.2.2f1 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity_TransparentWindowManager 2 | 3 | Make Unity's window transparent and overlay on desktop. 4 | 5 | ![](https://github.com/XJINE/Unity_TransparentWindowManager/blob/master/screenshot.png) 6 | 7 | ## Import to Your Project 8 | 9 | You can import this asset from UnityPackage. 10 | 11 | - [TransparentWindowManager.unitypackage](https://github.com/XJINE/Unity_TransparentWindowManager/blob/master/TransparentWindowManager.unitypackage) 12 | 13 | ### Dependencies 14 | 15 | You have to import following assets to use this asset. 16 | 17 | - [Unity_SingletonMonoBehaviour](https://github.com/XJINE/Unity_SingletonMonoBehaviour) 18 | 19 | ## How to Use 20 | 21 | ### Clear Color Settings 22 | 23 | To make transparent window, set ``Camera.ClearFlags`` to ``SolidColor``, and the ``Camera.Background`` to (0,0,0,0). 24 | When set ``Camera.Background to (1,1,1,0)``, the result gets wrong. 25 | 26 | ## Limitation 27 | 28 | This is for Windows, not works on Mac or any others. 29 | 30 | Transparency is ignored when use window mode in some laptop (especially when it use mobile type GPU). 31 | Need to use full-screen mode in such case. 32 | 33 | In another way, use command-line option like a following 34 | and make the popup-window which has more over full-screen resolution. 35 | 36 | ``` 37 | -popupwindow -screen-width xxxx -screen-height xxxx 38 | ``` 39 | 40 | ### Tearing 41 | 42 | Sometimes gets tearing and I can't find the cause. However, it is not serious. 43 | 44 | ### Jaggy 45 | 46 | There is a little jaggy even if use anti-aliasing, especially in low-dpi. 47 | 48 | ### Anti-Aliasing 49 | 50 | Some anti-aliasing shader gets wrong result. 51 | 52 | 53 | 54 | 55 | 56 |
DLAAWrong edges appears in the result.
FXAA2Some non-transparent pixel gets wrong transparency.
FXAA3All of the transparent pixel (in backgrounds) losts the transparency in the result.
57 | -------------------------------------------------------------------------------- /TransparentWindowManager.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/TransparentWindowManager.unitypackage -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XJINE/Unity_TransparentWindowManager/83b237e626a64f1a6affd2dbf77253ba4f20e92b/screenshot.png --------------------------------------------------------------------------------