{"id":22544326,"url":"https://github.com/sator-imaging/appwindowutility","last_synced_at":"2025-04-09T23:50:47.380Z","repository":{"id":38352550,"uuid":"327931094","full_name":"sator-imaging/AppWindowUtility","owner":"sator-imaging","description":"This utility is for Unity to configure application window style. With this utility, you can make your application window transparent, frameless and more.","archived":false,"fork":false,"pushed_at":"2023-01-15T06:16:34.000Z","size":75,"stargazers_count":178,"open_issues_count":5,"forks_count":23,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-09T23:50:41.753Z","etag":null,"topics":["csharp","hdrp","srp","unity","unity3d","window-frame","window-opacity"],"latest_commit_sha":null,"homepage":"https://satorimaging.github.io/OpenManual/AppWindowUtility/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sator-imaging.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-08T14:51:54.000Z","updated_at":"2025-04-09T14:41:54.000Z","dependencies_parsed_at":"2023-02-09T21:15:18.654Z","dependency_job_id":null,"html_url":"https://github.com/sator-imaging/AppWindowUtility","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sator-imaging%2FAppWindowUtility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sator-imaging%2FAppWindowUtility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sator-imaging%2FAppWindowUtility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sator-imaging%2FAppWindowUtility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sator-imaging","download_url":"https://codeload.github.com/sator-imaging/AppWindowUtility/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131455,"owners_count":21052819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","hdrp","srp","unity","unity3d","window-frame","window-opacity"],"created_at":"2024-12-07T14:06:57.510Z","updated_at":"2025-04-09T23:50:47.356Z","avatar_url":"https://github.com/sator-imaging.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"App Window Utility （日本語マニュアル）\r\n======================================\r\n\r\nこのライブラリは、Unity で作成されたアプリのウインドウスタイルをカスタマイズする為のものです。\r\nこのライブラリを使用することでアプリのウインドウを透過させたり、フレームを非表示にすること等が可能です。\r\n\r\n![](https://github.com/sator-imaging/sator-imaging.github.io/blob/master/AppWindowUtility/images/Opacity.gif?raw=true)\r\n\r\n\r\n\r\n# 制作・著作\r\n\r\nCopyright \u0026copy; 2022-2023 Sator Imaging, all rights reserved.\r\n\r\n\r\n\r\n# ライセンス\r\n\r\n\u003cp\u003e\r\n\u003cdetails\u003e\r\n\u003csummary\u003e上記の著作権表示および本許諾表示を、ソフトウェアのすべての複製または重要な部分に記載するものとします。\u003c/summary\u003e\r\n\r\n```text\r\nMIT License\r\n\r\nCopyright (c) 2022-2023 Sator Imaging\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n```\r\n\r\n\u003c/details\u003e\r\n\u003c/p\u003e\r\n\r\n\r\n\r\n\r\n# 機能\r\n\r\n以下の機能は Unity 2020.3 LTS と HDRP 10.3.2 を Windows 10 64-bit 上で実行して動作確認しています。\r\n\r\n\r\n#### 事前準備\r\n\r\n以下のサンプルを動作させるには、`using SatorImaging.AppWindowUtility;` を追加して名前空間を参照しておく必要があります。\r\n\r\n\r\n\r\n\r\n# サンプル\r\n\r\nサンプルはコチラ。その他の機能については以下のセクションをご覧ください。\r\n\r\n```csharp\r\nusing UnityEngine;\r\nusing SatorImaging.AppWindowUtility;\r\n\r\npublic class MyTest : MonoBehaviour\r\n{\r\n    void Start()\r\n    {\r\n        AppWindowUtility.Transparent = true;\r\n    }\r\n}\r\n```\r\n\r\n\r\n\r\n## 透過ウインドウ\r\n\r\n`bool AppWindowUtility.Transparent { get; set; }`\r\n\r\nアプリを透過ウインドウに設定します。ウインドウの後ろにある別のウインドウが透けて見えるようになります。\r\n\r\n透明度は Unity のレンダリング結果に依存しているので、カメラの `Background` を **Solid Color** に設定してアルファをゼロにする必要があります。\r\n\r\n\u003e 注： High-Definition Render Pipeline (HDRP) やその他の Scriptable Render Pipeline (SRP) ベースのレンダラーを使っている場合、Color Frame Buffer をデフォルトの RGB 10bit から RGB 16bit（8bit があればそちらでも可）に設定する必要があります。\r\n\r\n\u003cimg src=\"https://dl.dropbox.com/s/sntvylmfgrrfw9w/Transparent.gif?dl=1\" /\u003e\r\n\r\n\r\n\r\n## ウインドウの不透明度\r\n\r\n`AppWindowUtility.SetWindowOpacity(byte opacity)`\r\n\r\nウインドウ全体の不透明度を設定します。透過ウインドウと組み合わせて使うこともできます。\r\n\r\n\u003cimg src=\"https://dl.dropbox.com/s/clu72kycyq2isvn/Opacity.gif?dl=1\" /\u003e\r\n\r\n\r\n\r\n## `WindowGrabber` コンポーネント\r\n\r\n透過ウインドウが有効になっているとタイトルバーが消えてしまうので、ウインドウを移動することが出来なくなってしまいます。\r\n\r\n`WindowGrabber` を空の `GameObject` に追加することで、アプリのウインドウのどこかをドラッグすれば移動できるようになります。\r\n\r\n\u003cimg src=\"https://dl.dropbox.com/s/oxcnjfdkdshogf0/MoveWindow_WindowGrabber.png?dl=1\" /\u003e\r\n\r\n\r\n\r\n※ `WindowGrabber` が有効な間も uGUI を使うことが出来ます。  \r\n\u003cimg src=\"https://dl.dropbox.com/s/etmsd3zb0muhltd/MoveWindow.gif?dl=1\" /\u003e\r\n\r\n\r\n\r\n## フルスクリーンモード\r\n\r\n`bool AppWindowUtility.FullScreen { get; set; }`\r\n\r\nウインドウをフルスクリーンに設定します。\r\n\r\n\u003e 注： Unity 標準の `UnityEngine.Screen.SetResolution(width, height, isFullScreen)` ではなくコチラを使った方が App Window Utility との相性が良いです。\r\n\r\n\r\n\r\n\r\n## 常に手前に表示（Always on Top）\r\n\r\n`bool AppWindowUtility.AlwaysOnTop { get; set; }`\r\n\r\nウインドウがフォーカスを失っても、常に最前面に表示されるようになります。\r\n\r\n\u003cimg src=\"https://dl.dropbox.com/s/sip8uw1d91osdii/AlwaysOnTop.gif?dl=1\" /\u003e\r\n\r\n\r\n\r\n## クリックスルーモード\r\n\r\n`bool AppWindowUtility.ClickThrough { get; set; }`\r\n\r\nアプリケーションがマウスのクリックを受け付けなくなります。\r\n\r\n\u003e 注： マウスを使わずにこの機能をオフにする方法を実装する必要があります。実装しなかった場合、二度とアプリに触れなくなります。\r\n\r\n\u003cimg src=\"https://dl.dropbox.com/s/o27h63u7g5tg9mm/ClickThru_B.gif?dl=1\" /\u003e\r\n\r\n\r\n\r\n## ウインドウフレームの表示\r\n\r\n`bool AppWindowUtility.FrameVisibility { get; set; }`\r\n\r\nウインドウのフレームを表示・非表示に設定します。\r\n\r\n※ 透過ウインドウに設定すると、同時にフレームの表示もオフに設定されます。\r\n\r\n\r\n\r\n## カラーキーイングウインドウ\r\n\r\n`AppWindowUtility.SetKeyingColor(byte red, byte green, byte blue)`\r\n\r\nアプリのウインドウ全体に対して、特定の色を透過させる機能を有効にします。\r\nかなり特殊なので、`AppWindowUtility.Transparent` を使った方が良いです。\r\n\r\n\r\n\r\n## 加算合成モード\r\n\r\nWindows の場合、`AppWindowUtility.SetKeyingColor(0, 0, 0)` を設定した後に `AppWindowUtility.Transparent = true` を設定すると、透過ウインドウが加算合成モードになります。\r\n\r\n※注※ これは Windows のバグの可能性があります。\r\n\r\n\u003cimg src=\"https://dl.dropbox.com/s/nt5mmncsz6cfvh6/AdditiveComposition.gif?dl=1\" /\u003e\r\n\r\n\r\n\r\n# 注意点\r\n\r\n\r\n## プレイヤー設定（Player Settings）\r\n\r\n正しく動作させるためには、`Use DXGI Flip Model Swapchain for D3D11` をオフに設定する必要があります。\r\n\r\n※ App Window Utility が期待通りに動作しない場合、以下のプレイヤー設定を参考にしてください。\r\n\r\n\u003cimg src=\"https://dl.dropbox.com/s/72ii6o5dj7yxqtt/Notes_PlayerSettings.png?dl=1\" /\u003e\r\n\r\n\r\n\r\n## High-Definition Render Pipeline (HDRP) と同時に使用する場合\r\n\r\n`Color Buffer Format` は必ず RGB 16bit（またはホスト OS が対応しているフォーマット）に設定する必要があります。\r\nScriptable Render Pipeline (SRP) ベースのレンダラーは同様の設定が必要になります。\r\n\r\n\u003cimg src=\"https://dl.dropbox.com/s/d1qieutmog4npbw/Notes_HDRP.png?dl=1\" /\u003e\r\n\r\n\r\n\r\n## 透過ウインドウとウィンドウフレームの表示\r\n\r\n`Transparent = true` を設定した後に `FrameVisibility = true` を設定すると、アプリの背景が非表示になった状態でウインドウフレームが表示されます。結果としてウインドウ全体がフレームの色で塗りつぶされることになります。\r\n\r\n\u003cimg src=\"https://dl.dropbox.com/s/sr55jdguin250ic/Notes_TransparentThenShowFrame.gif?dl=1\" /\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsator-imaging%2Fappwindowutility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsator-imaging%2Fappwindowutility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsator-imaging%2Fappwindowutility/lists"}