Showing preview only (1,870K chars total). Download the full file or copy to clipboard to get everything.
Repository: kirurobo/UniWindowController
Branch: main
Commit: d9d03bdc687b
Files: 242
Total size: 1.7 MB
Directory structure:
gitextract_ik_wzm75/
├── .github/
│ └── workflows/
│ ├── main.yml
│ └── upm.yml
├── .gitignore
├── LICENSE.txt
├── README-ja.md
├── README.md
├── UniWinC/
│ ├── .gitignore
│ ├── .vscode/
│ │ ├── extensions.json
│ │ ├── launch.json
│ │ └── settings.json
│ ├── Assets/
│ │ ├── InputSystem.inputsettings.asset
│ │ ├── InputSystem.inputsettings.asset.meta
│ │ ├── Kirurobo/
│ │ │ ├── UniWindowController/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── CHANGELOG.md
│ │ │ │ ├── CHANGELOG.md.meta
│ │ │ │ ├── Editor/
│ │ │ │ │ ├── Kirurobo.UniWindowController.Editor.asmdef
│ │ │ │ │ ├── Kirurobo.UniWindowController.Editor.asmdef.meta
│ │ │ │ │ ├── Scripts/
│ │ │ │ │ │ ├── UniWindowControllerBatch.cs
│ │ │ │ │ │ ├── UniWindowControllerBatch.cs.meta
│ │ │ │ │ │ ├── UniWindowControllerEditor.cs
│ │ │ │ │ │ └── UniWindowControllerEditor.cs.meta
│ │ │ │ │ └── Scripts.meta
│ │ │ │ ├── Editor.meta
│ │ │ │ ├── LICENSE.md
│ │ │ │ ├── LICENSE.md.meta
│ │ │ │ ├── README-ja.md
│ │ │ │ ├── README-ja.md.meta
│ │ │ │ ├── README.md
│ │ │ │ ├── README.md.meta
│ │ │ │ ├── Runtime/
│ │ │ │ │ ├── Kirurobo.UniWindowController.asmdef
│ │ │ │ │ ├── Kirurobo.UniWindowController.asmdef.meta
│ │ │ │ │ ├── Plugins/
│ │ │ │ │ │ ├── MacOS/
│ │ │ │ │ │ │ ├── LibUniWinC.bundle/
│ │ │ │ │ │ │ │ └── Contents/
│ │ │ │ │ │ │ │ ├── Info.plist
│ │ │ │ │ │ │ │ ├── MacOS/
│ │ │ │ │ │ │ │ │ └── LibUniWinC
│ │ │ │ │ │ │ │ └── _CodeSignature/
│ │ │ │ │ │ │ │ └── CodeResources
│ │ │ │ │ │ │ └── LibUniWinC.bundle.meta
│ │ │ │ │ │ ├── MacOS.meta
│ │ │ │ │ │ ├── Windows/
│ │ │ │ │ │ │ ├── x64/
│ │ │ │ │ │ │ │ └── LibUniWinC.dll.meta
│ │ │ │ │ │ │ ├── x64.meta
│ │ │ │ │ │ │ ├── x86/
│ │ │ │ │ │ │ │ └── LibUniWinC.dll.meta
│ │ │ │ │ │ │ └── x86.meta
│ │ │ │ │ │ └── Windows.meta
│ │ │ │ │ ├── Plugins.meta
│ │ │ │ │ ├── Prefabs/
│ │ │ │ │ │ ├── DragMoveCanvas.prefab
│ │ │ │ │ │ ├── DragMoveCanvas.prefab.meta
│ │ │ │ │ │ ├── UniWindowController.prefab
│ │ │ │ │ │ └── UniWindowController.prefab.meta
│ │ │ │ │ ├── Prefabs.meta
│ │ │ │ │ ├── Scripts/
│ │ │ │ │ │ ├── LowLevel/
│ │ │ │ │ │ │ ├── FilePanel.cs
│ │ │ │ │ │ │ ├── FilePanel.cs.meta
│ │ │ │ │ │ │ ├── UniWinCore.cs
│ │ │ │ │ │ │ └── UniWinCore.cs.meta
│ │ │ │ │ │ ├── LowLevel.meta
│ │ │ │ │ │ ├── UniWindowController.cs
│ │ │ │ │ │ ├── UniWindowController.cs.meta
│ │ │ │ │ │ ├── UniWindowMoveHandle.cs
│ │ │ │ │ │ └── UniWindowMoveHandle.cs.meta
│ │ │ │ │ └── Scripts.meta
│ │ │ │ ├── Runtime.meta
│ │ │ │ ├── Samples/
│ │ │ │ │ ├── 00_Menu/
│ │ │ │ │ │ ├── SampleManager.cs
│ │ │ │ │ │ ├── SampleManager.cs.meta
│ │ │ │ │ │ ├── SampleMenu.unity
│ │ │ │ │ │ ├── SampleMenu.unity.meta
│ │ │ │ │ │ ├── SampleMenuSettings.lighting
│ │ │ │ │ │ └── SampleMenuSettings.lighting.meta
│ │ │ │ │ ├── 00_Menu.meta
│ │ │ │ │ ├── 01_SimpleSample/
│ │ │ │ │ │ ├── SimpleSample.unity
│ │ │ │ │ │ └── SimpleSample.unity.meta
│ │ │ │ │ ├── 01_SimpleSample.meta
│ │ │ │ │ ├── 02_UiSample/
│ │ │ │ │ │ ├── UiSample.unity
│ │ │ │ │ │ ├── UiSample.unity.meta
│ │ │ │ │ │ ├── UiSampleCanvas.prefab
│ │ │ │ │ │ ├── UiSampleCanvas.prefab.meta
│ │ │ │ │ │ ├── UiSampleController.cs
│ │ │ │ │ │ └── UiSampleController.cs.meta
│ │ │ │ │ ├── 02_UiSample.meta
│ │ │ │ │ ├── 03_Fullscreen/
│ │ │ │ │ │ ├── FullscreenSample.cs
│ │ │ │ │ │ ├── FullscreenSample.cs.meta
│ │ │ │ │ │ ├── FullscreenSample.unity
│ │ │ │ │ │ ├── FullscreenSample.unity.meta
│ │ │ │ │ │ ├── FullscreenSampleSettings.lighting
│ │ │ │ │ │ ├── FullscreenSampleSettings.lighting.meta
│ │ │ │ │ │ ├── SnowParticle.mat
│ │ │ │ │ │ ├── SnowParticle.mat.meta
│ │ │ │ │ │ ├── SnowmanArm.mat
│ │ │ │ │ │ ├── SnowmanArm.mat.meta
│ │ │ │ │ │ ├── SnowmanBody.mat
│ │ │ │ │ │ ├── SnowmanBody.mat.meta
│ │ │ │ │ │ ├── SnowmanFace.mat
│ │ │ │ │ │ └── SnowmanFace.mat.meta
│ │ │ │ │ ├── 03_Fullscreen.meta
│ │ │ │ │ ├── 04_FileDialog/
│ │ │ │ │ │ ├── FileDialogSample.cs
│ │ │ │ │ │ ├── FileDialogSample.cs.meta
│ │ │ │ │ │ ├── FileDialogSample.unity
│ │ │ │ │ │ ├── FileDialogSample.unity.meta
│ │ │ │ │ │ ├── FileDialogSampleSettings.lighting
│ │ │ │ │ │ └── FileDialogSampleSettings.lighting.meta
│ │ │ │ │ ├── 04_FileDialog.meta
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── AutoRotator.cs
│ │ │ │ │ │ ├── AutoRotator.cs.meta
│ │ │ │ │ │ ├── CollisionBorder.png.meta
│ │ │ │ │ │ ├── GreenBorder.png.meta
│ │ │ │ │ │ ├── InputModuleProxy.cs
│ │ │ │ │ │ ├── InputModuleProxy.cs.meta
│ │ │ │ │ │ ├── InputProxy.cs
│ │ │ │ │ │ ├── InputProxy.cs.meta
│ │ │ │ │ │ ├── ModelController.cs
│ │ │ │ │ │ ├── ModelController.cs.meta
│ │ │ │ │ │ ├── UiMaterial.mat
│ │ │ │ │ │ └── UiMaterial.mat.meta
│ │ │ │ │ └── Common.meta
│ │ │ │ ├── Samples.meta
│ │ │ │ ├── package.json
│ │ │ │ └── package.json.meta
│ │ │ └── UniWindowController.meta
│ │ └── Kirurobo.meta
│ ├── Packages/
│ │ ├── manifest.json
│ │ └── packages-lock.json
│ └── ProjectSettings/
│ ├── AudioManager.asset
│ ├── ClusterInputManager.asset
│ ├── DynamicsManager.asset
│ ├── EditorBuildSettings.asset
│ ├── EditorSettings.asset
│ ├── GraphicsSettings.asset
│ ├── InputManager.asset
│ ├── MemorySettings.asset
│ ├── NavMeshAreas.asset
│ ├── NetworkManager.asset
│ ├── PackageManagerSettings.asset
│ ├── Physics2DSettings.asset
│ ├── PresetManager.asset
│ ├── ProjectSettings.asset
│ ├── ProjectVersion.txt
│ ├── QualitySettings.asset
│ ├── SceneTemplateSettings.json
│ ├── TagManager.asset
│ ├── TimeManager.asset
│ ├── UnityConnectSettings.asset
│ ├── VFXManager.asset
│ ├── VersionControlSettings.asset
│ └── XRSettings.asset
├── VisualStudio/
│ ├── .gitignore
│ ├── LibUniWinC/
│ │ ├── LibUniWinC.vcxproj
│ │ ├── LibUniWinC.vcxproj.filters
│ │ ├── Resource.rc
│ │ ├── dllmain.cpp
│ │ ├── framework.h
│ │ ├── libuniwinc.cpp
│ │ ├── libuniwinc.h
│ │ ├── pch.cpp
│ │ ├── pch.h
│ │ └── resource.h
│ ├── LibUniWinC.sln
│ └── TestLibUniWinC/
│ ├── Additional/
│ │ ├── WindowInfo.cs
│ │ └── WindowList.cs
│ ├── App.config
│ ├── FormMain.Designer.cs
│ ├── FormMain.cs
│ ├── FormMain.resx
│ ├── LowLevel/
│ │ ├── FilePanel.cs
│ │ └── UniWinCore.cs
│ ├── Program.cs
│ ├── Properties/
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── TestLibUniWinC.csproj
│ └── UnityEmulation/
│ ├── AOT.cs
│ └── UnityEngine.cs
├── Xcode/
│ ├── .gitignore
│ ├── DebugUniWinC/
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets/
│ │ │ ├── AccentColor.colorset/
│ │ │ │ └── Contents.json
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── ContentView.swift
│ │ ├── DebugUniWinC.entitlements
│ │ ├── DebugUniWinCApp.swift
│ │ └── Preview Content/
│ │ └── Preview Assets.xcassets/
│ │ └── Contents.json
│ └── LibUniWinC/
│ ├── CustomPanelHelper.swift
│ ├── LibUniWinC.swift
│ ├── OverlayView.swift
│ ├── README.md
│ └── UnityInterface.swift
└── docs/
└── reference/
└── html/
├── annotated.html
├── annotated_dup.js
├── class_kirurobo_1_1_bool_property_attribute.html
├── class_kirurobo_1_1_file_panel-members.html
├── class_kirurobo_1_1_file_panel.html
├── class_kirurobo_1_1_file_panel.js
├── class_kirurobo_1_1_file_panel_1_1_filter-members.html
├── class_kirurobo_1_1_file_panel_1_1_filter.html
├── class_kirurobo_1_1_file_panel_1_1_filter.js
├── class_kirurobo_1_1_file_panel_1_1_lib_uni_win_c-members.html
├── class_kirurobo_1_1_file_panel_1_1_lib_uni_win_c.html
├── class_kirurobo_1_1_file_panel_1_1_lib_uni_win_c.js
├── class_kirurobo_1_1_read_only_attribute.html
├── class_kirurobo_1_1_uni_win_core_1_1_lib_uni_win_c-members.html
├── class_kirurobo_1_1_uni_win_core_1_1_lib_uni_win_c.html
├── class_kirurobo_1_1_uni_window_controller-members.html
├── class_kirurobo_1_1_uni_window_controller.html
├── class_kirurobo_1_1_uni_window_controller.js
├── class_kirurobo_1_1_uni_window_move_handle-members.html
├── class_kirurobo_1_1_uni_window_move_handle.html
├── class_kirurobo_1_1_uni_window_move_handle.js
├── classes.html
├── dir_0e718f53d4d08174de87a4996d0abd84.html
├── dir_1168cf2394713e5b88a61dc9b39953d6.html
├── dir_4db8f2e691505777dda71083a7488821.html
├── dir_4e895f04d87c71be14ec988997553c7b.html
├── dir_51678baafa3da7bcbbacfbc079e72355.html
├── dir_8d1ea225d71cf43ce7bb9f8bd477064e.html
├── dir_9422bc27ad0eb84eb9766082ef3d355d.html
├── dir_a0d8a0ff27d847f01310e1251fc46482.html
├── dir_a545219465fede22cd758cef02b8764c.html
├── doxygen.css
├── dynsections.js
├── functions.html
├── functions_enum.html
├── functions_evnt.html
├── functions_func.html
├── functions_prop.html
├── functions_vars.html
├── hierarchy.html
├── hierarchy.js
├── index.html
├── jquery.js
├── menu.js
├── menudata.js
├── namespace_kirurobo.html
├── namespace_kirurobo.js
├── namespaces.html
├── namespaces_dup.js
├── navtree.css
├── navtree.js
├── navtreedata.js
├── navtreeindex0.js
├── resize.js
├── struct_kirurobo_1_1_file_panel_1_1_lib_uni_win_c_1_1_panel_settings-members.html
├── struct_kirurobo_1_1_file_panel_1_1_lib_uni_win_c_1_1_panel_settings.html
├── struct_kirurobo_1_1_file_panel_1_1_settings-members.html
├── struct_kirurobo_1_1_file_panel_1_1_settings.html
└── tabs.css
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/main.yml
================================================
name: Generate preview-upm branches
# Reference
# - https://tips.hecomi.com/entry/2021/10/29/001304
on:
push:
branches:
- main
workflow_dispatch:
env:
MAIN_BRANCH: main
UPM_BRANCH: preview-upm
PKG_ROOT_DIR: UniWinC/Assets/Kirurobo/UniWindowController
SAMPLES_DIR: Samples
DOC_FILES:
jobs:
update:
runs-on: ubuntu-latest
steps:
# 最新のリリースバージョンを取得
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- run: git checkout "$MAIN_BRANCH"
# 生成者の名前を設定
- name: Git config
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# UPM 用のブランチを作成
- name: Create preview UPM branches
run: |
# 古いブランチを削除
git branch -D "$UPM_BRANCH" &> /dev/null || echo "$UPM_BRANCH" branch is not found
# アセットの中身を UPM ブランチに切り出す
git subtree split -P "$PKG_ROOT_DIR" -b "$UPM_BRANCH"
# 切り出したブランチに移動
git checkout "$UPM_BRANCH"
# サンプルディレクトリを ~ 付きに改名
git mv "$SAMPLES_DIR" "$SAMPLES_DIR~" &> /dev/null || echo "$SAMPLES_DIR" is not found
# サンプルディレクトリの .meta は削除
rm "$SAMPLES_DIR.meta"
# タグ名とともにコミット
git commit -am "Update preview UPM."
# GitHubへプッシュ
git push -f origin "$UPM_BRANCH"
================================================
FILE: .github/workflows/upm.yml
================================================
name: Generate upm branches
# Reference
# - https://tips.hecomi.com/entry/2021/10/29/001304
on:
push:
# main ブランチが更新されたときではなく、'v*' というタグが push されたときにのみ実行させる
tags:
- v*
workflow_dispatch:
env:
MAIN_BRANCH: main
UPM_BRANCH: upm
PKG_ROOT_DIR: UniWinC/Assets/Kirurobo/UniWindowController
SAMPLES_DIR: Samples
DOC_FILES:
jobs:
update:
runs-on: ubuntu-latest
steps:
# 最新のリリースバージョンを取得
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- run: git checkout "$MAIN_BRANCH"
# イベントを起動したタグを steps.tag.outputs.name に格納
- name: Tag name
id: tag
run: echo ::set-output name=name::${GITHUB_REF#refs/tags/v}
# 生成者の名前を設定
- name: Git config
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# UPM 用のブランチを作成
- name: Create UPM branches
run: |
# 古いブランチを削除
git branch -D "$UPM_BRANCH" &> /dev/null || echo "$UPM_BRANCH" branch is not found
# アセットの中身を UPM ブランチに切り出す
git subtree split -P "$PKG_ROOT_DIR" -b "$UPM_BRANCH"
# 切り出したブランチに移動
git checkout "$UPM_BRANCH"
## メインブランチにあった README などをインポート
#for file in "$DOC_FILES"; do
# git checkout "$MAIN_BRANCH" $file &> /dev/null || echo "$file" is not found
#done
# サンプルディレクトリを ~ 付きに改名
git mv "$SAMPLES_DIR" "$SAMPLES_DIR~" &> /dev/null || echo "$SAMPLES_DIR" is not found
# サンプルディレクトリの .meta は削除
rm "$SAMPLES_DIR.meta"
## package.json のバージョンを置換
# sed -i -e "s/\"version\":.*$\"version\": \"$TAG\",/" package.json || echo package.json is not found
# タグ名とともにコミット
git commit -am "release $TAG."
# GitHubへプッシュ
git push -f origin "$UPM_BRANCH"
# タグ付きのブランチも作成してプッシュ
git checkout -b "$UPM_BRANCH@$TAG"
git push -f origin "$UPM_BRANCH@$TAG"
env:
TAG: ${{ steps.tag.outputs.name }}
================================================
FILE: .gitignore
================================================
/.vs/
.DS_Store
================================================
FILE: LICENSE.txt
================================================
MIT License
Copyright (c) 2020 Kirurobo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README-ja.md
================================================
# UniWindowController
Unified window controller for macOS and Windows
略称:UniWinC(ユニウィンク)
[](https://github.com/kirurobo/UniWindowController/blob/master/LICENSE)
<a href="https://flatt.tech/oss/gmo/trampoline" target="_blank"><img src="https://flatt.tech/assets/images/badges/gmo-oss.svg" height="20px"/></a>
### README
- [Japanese (日本語での説明)](README-ja.md)
- [English](README.md)
## 概要
Unity の Windows / macOS 向けビルドで、自ウィンドウの位置、サイズ、透過、枠非表示などをコントロールします。
また、ファイル、フォルダのドロップも受け付け可能にできます。
Windows、macOS それぞれではコード例やアセットが見つかりましたが、統一的に扱えるものが無さそうだったため作成しました。

https://twitter.com/i/status/1314440790945361920
## デモ
[UniWinC_VRM](https://github.com/kirurobo/UniWinC_VRM) にはビルドしたVRMファイルビューアーのサンプルを置いてあります。
## インストール
UPMの方法ですと、バージョンアップもUPMから行えるようになります。
A. Unity Package Manager (UPM) を利用する手順
1. Unity エディタの [Window]メニューから [Package Manager] を開く
2. [+] から [Add package from git URL...] を選択

3. https://github.com/kirurobo/UniWindowController.git#upm を入力して [Add] する

B. UnityPackage を利用する手順
1. [Release のページ](https://github.com/kirurobo/UniWindowController/releases) から .unitypackage ファイルをダウンロード
2. Unity エディタでインポート
## Unity プロジェクトでの利用
1. Runtime/Prefabs にある `UniWindowController` プレハブをシーンに追加
2. そこで配置された `UniWindowController` をインスペクターで確認
- Player Settings を適切に直す(緑のボタンでまとめて設定が変更されます)
- `IsTransparent` 等、設定をお好みに合わせる
3. 左ドラッグでウィンドウ自体を動かしたい場合、 Runtime/Prefabs の `DragMoveCanvas` プレハブも追加
- 動作には EventSystem が必要です。もしシーンに無ければ UI → Event System を追加してください。
4. PC / Mac スタンドアローンでビルドする
5. ビルドしたものを起動
### URP 利用時の設定
背景を透明にするためには、アルファチャンネルを維持する必要があります。
そのためにいくつかの条件があります。
- HDR は無効にする [参考](https://github.com/kirurobo/UniWindowController/issues/42#issuecomment-2507577260)
- Main Camera (GameObject) > Camera (Component) > Output > HDR: Off
- AlphaProcessing は有効にする [図](https://github.com/kirurobo/UniWindowController/issues/42#issuecomment-2601063168)
## 制限事項
- Direct3D12 では背景透過が有効となりません。Direct3D11 では `Use DXGI flip model swapchain for D3D11` を無効にすることで透過が可能です。
- Unityエディタ上では透過はできません。ビルドをしてお試しください。
- 常に最前面やウィンドウ移動等は動作しますが、実行中にゲームビューを閉じたりドッキングの配置を変えることはお勧めしません。一応、ゲームビューにフォーカスを移すとウィンドウを再取得はします。
- マウスでは良いのですが、タッチ操作には適切な対応がまだ定まっていません。
- Windows の場合、`TransparentType` を Alpha から ColorKey にすると、半透明の表現が失われる代わりにタッチ操作は自然になります。
- 複数ウィンドウには対応していません。
- 完全に動作検証ができている訳ではなく、不安定な動作もあるかもしれません。
既知の問題については [Issues](https://github.com/kirurobo/UniWindowController/issues) もご覧ください。
## 動作環境
- Unity: 2019 4.31f1 or later
- Scripting Runtime: .NET 4.x or later
- OS: Windows 10, Windows 11 or macOS
開発は Unity 2022.3.22f1, Windows 11 / macOS 15.3 で行っています
## 補足情報
### ヒットテストについて
正常にウィンドウを透過できると、あたかも長方形ではないウィンドウのように見えます。
ですがそれは見た目だけで、実は長方形のウィンドウとして存在しています。
そこで、マウスカーソルの直下を見て、透明ならばマウス操作を下のウィンドウに受け流す(クリックスルー)状態とし、不透明なら通常に戻す、という"ヒットテスト"を常に行なうことで、
あたかも見える部分しか存在しないように見せています。
このヒットテストについては2種類用意してあります。(自動ヒットテストを無効にして、自分で制御する、またはしないという選択も可能です。)
| Name | Method | Note |
|:-----|:-----|:------------|
|Opacity|透明度を見る|見た目と一致して自然だが、処理が重い|
|Raycast|Coliderを見る|より動作が軽いが、Coliderの用意が必要|
Raycastの方法の方がパフォーマンス的に推奨ですが、Coliderを忘れると触れなくなるため、デフォルトでは Opacity としています。
また注意として、タッチ操作だとあらかじめ指の下の色を確認できないため、操作に違和感を感じると思います。
どのように対応すべきかベストの解決策が見つかっていないため、タッチ対応に関してはすみませんが後回しとなっています。
### 透過方法について(Windowsのみ選択可)
タッチ操作に対応する一つの方法として、layered window の単色透過を選択できるようにしてあります。
これを選ぶと半透明が表現できず、パフォーマンスも落ちますが、ヒットテストをWindowsに任せるためタッチ操作に対しては感覚に一致するはずです。
| Name | Description | Note |
|:-----|:-----|:------------|
|Alpha|レンダリング結果の透明度を反映|こちらが標準|
|ColorKey|RGBが一致する一色のみ透過|パフォーマンス悪いが、タッチは自然|
### C# スクリプト
Unityで他のスクリプトから操作できるものです。
仕様は固まってはいないため、変更される場合があります。
#### UniWindowController.cs
本体です。
他のスクリプトから操作できるプロパティとして下記があります。(他にも追加されたりします。)
| Name | Type | Description |
|:-----|:-----|:------------|
|isTransparent|bool| 透過(非矩形)ウィンドウに設定/解除します|
|isTopmost |bool| 常に最前面に設定/解除します|
|isZoomed |bool| 最大化/解除をします。また現在の状態を取得します |
|isHitTestEnabled|bool| 自動ヒットテストを有効/無効にします。有効だとマウスカーソル位置により isClickThrough が自動で変化します。 |
|isClickThrough|bool| クリックスルー状態に設定/解除します|
|windowPosition|Vector2| ウインドウ位置を取得/設定できます。※メインモニタ左下が原点で上向き正の座標系で、ウィンドウ左下座標です |
|windowSize|Vector2| ウインドウサイズを取得/設定できます |
#### UniWindowMoveHandler.cs
このスクリプトをUI要素(Raycast Targetとなるもの)にアタッチしておくと、そのUI要素のドラッグでウィンドウを移動できるようになります。
例えば「ここを掴んで移動できます」というハンドルの画像にアタッチする想定です。
DragMoveCanvas というプレハブ内では、透明な全画面を覆うPanelを使っています。
このとき Layer を「Ignore Raycast」にすることで、自動ヒットテストが Raycast の場合でも対象外となります。
これにより画面のどこでもドラッグできるようになります。
ただし他のUI上の操作はドラッグでの移動より優先されます。(DragMoveCanvas で Sort Order を小さくしているため。)
#### LowLevel/FilePanel.cs
ファイル選択ダイアログを開く static メソッドがあります。
UniWindowController のインスタンスがなくても使えますが、その場合は呼んだ時点のウィンドウを親として開きます。
- FilePanel.OpenFilePanel()
- ファイルを開く場合の選択ダイアログ。複数選択も可能。
- FilePanel.SaveFilePanel()
- ファイルを保存する際の選択ダイアログ。
### ソースのフォルダ構成
利用するだけならば、Release にある unitypackage をダウンロードしていただけばよく、このリポジトリをクローンする必要はありません。
ソースを見たい/ビルドしたい場合は、このようになっていますので参照ください。
- UniWinC
- Unity のプロジェクトです。
- ビルド済みの DLL、bundle も既に含みます。
- ここの内容が unitypackage としてリリースにあります。
- VisualStudio
- Windows版 x86, x64 の LibUniWinC.dll を生成するソリューションがあります。
- Release でビルドすると Unity フォルダ下の DLL が上書きされます。
- テスト用Windowsフォームアプリのプロジェクトも含まれます。
- Xcode
- macOS版 LibUniWinC.bundle を生成するプロジェクトがあります。
- ビルドすると Unity フォルダ下の .bundle が上書きされます。
## 謝辞
- macOS側のコードは かりばぁ さんの [Unity + Mac + Swift で透過最前面ウィンドウを作る](https://qiita.com/KRiver1/items/9ecf65759cf1349f56af) をベースにさせていただきました。
- GitHub Actions での UPM ブランチ生成は hecomi さんの [Unity で .unitypackage で配布していたアセットを Package Manager 対応してみた](https://tips.hecomi.com/entry/2021/10/29/001304) を参考にしました。
この場を借りて感謝を申し上げます。
================================================
FILE: README.md
================================================
# UniWindowController
Unified window controller for macOS and Windows
Abbreviation:UniWinC
[](https://github.com/kirurobo/UniWindowController/blob/master/LICENSE)
<a href="https://flatt.tech/oss/gmo/trampoline" target="_blank"><img src="https://flatt.tech/assets/images/badges/gmo-oss.svg" height="20px"/></a>
### README
- [Japanese (日本語での説明)](README-ja.md)
- [English](README.md)
## Overview
This is a library for apps built for Windows / macOS standalone with Unity.
This library controls transparency, borderless, position, size, etc. of its own window.
And it allows also accept file and folder drops.

https://twitter.com/i/status/1314440790945361920
## Demo
You can find a sample VRM viewer via [UniWinC_VRM](https://github.com/kirurobo/UniWinC_VRM).
## Installation
If you use the UPM, you can also perform version upgrades from UPM.
A. Using the Unity Package Manager (UPM)
1. Open [Package Manager] from the [Window] menu of the Unity Editor.
2. Select [+] and then select [Add package from git URL...].

3. Enter https://github.com/kirurobo/UniWindowController.git#upm and [Add].

B. Using an UnityPackage
1. Download an .unitypackage file from the [Release page](https://github.com/kirurobo/UniWindowController/releases).
2. Import the asset in the Unity Editor.
## Use in your Unity project
1. Add the `UniWindowController` prefab in the Runtime/Prefabs to your scene.
2. Select the `UniWindowController` placed scene, and watch the inspector.
- Fix the Player Settings appropriately (the green button will change all settings at once)
- Adjust the settings such as `IsTransparent` to your liking
3. Add `DragMoveCanvas` prefab in the Runtime/Prefabs if you want to move the window by mouse dragging.
- An EventSystem is required for this to work. If it is not present in your scene, add UI → Event System.
4. Build for PC / Mac standalone
5. Launch the build
### Settings when using URP
To make the background transparent, the alpha channel must be maintained.
There are some conditions for this.
- HDR must be disabled [Reference](https://github.com/kirurobo/UniWindowController/issues/42#issuecomment-2507577260)
- Main Camera (GameObject) > Camera (Component) > Output > HDR: Off
- AlphaProcessing must be enabled [Figure](https://github.com/kirurobo/UniWindowController/issues/42#issuecomment-2601063168)
## Limitations
- Background transparency is not enabled in Direct3D12; in Direct3D11, transparency can be enabled by disabling `Use DXGI flip model swapchain for D3D11`.
- Transparency is not available on the Unity Editor. Please build and try it.
- It works for topmost, moving windows, etc., but I do not recommend closing the game view or changing the docking arrangement while it is running. In the meantime, the window will reacquire when the focus is shifted to the game view.
- The proper support for touch operations has not yet been determined.
- On Windows, if you change the `TransparentType` from Alpha to ColorKey, you will lose the beautiful translucency, but the touch operation will be natural.
- Multiple windows are not supported.
- This has not been fully tested and there may be unstable behavior.
See also [Issues](https://github.com/kirurobo/UniWindowController/issues) for known issues.
## System requirements
- Unity: 2019 4.31f1 or later
- Scripting Runtime: .NET 4.x or later
- OS: Windows 10, Windows 11 or macOS
Development environment is Unity 2022.3.22f1, Windows 11 / macOS 15.3
## Additional information
### About the hit test
When the window is successfully made transparent, it looks as if it is a non-rectangular window.
However, this is only an appearance, and the window actually exists as a rectangular window.
Therefore, by looking directly under the mouse cursor, if it is transparent, the mouse operation is passed to the window below (click-through), and if it is opaque, the mouse operation is returned to normal,
If it is opaque, it returns to normal.
Two types of hit tests are available. (You can also choose to disable the automatic hit test and control it yourself or not.)
| Name | Method | Note |
|:-----|:-----|:------------|
|Opacity|Check transparency|Matches appearance and is natural, but heavy processing|
|Raycast|Check colider|Lightweight, but requires coliders|
The Raycast method is recommended in terms of performance, but if you forget colider, you will not be able to touch the screen, so the default is Opacity.
Also, note that touch operation may feel uncomfortable because you cannot see the color under your finger in advance.
Since we have not found the best solution for this, I'm sorry to say that touch support has been put on the back burner.
### About the transparency method (Seceltable only on Windows)
One way to support touch operation is to select monochromatic transparency for layered windows.
If this is selected, semi-transparency cannot be expressed and performance will be reduced, but since the hit test is left to Windows, it should match your senses for touch operation.
| Name | Description | Note |
|:-----|:-----|:------------|
|Alpha|Reflects transparency of rendering results|This is standard|
|ColorKey|Only one color with matching RGB is transparent|Poor performance, but touch is natural|
### C# scripting
This is something that can be manipulated from other scripts in Unity.
Specifications are not finalized and are subject to change.
#### UniWindowController.cs
This is the main script.
The following properties can be manipulated from other scripts. (Other properties may be added.)
| Name | Type | Description |
|:-----|:-----|:------------|
|isTransparent|bool| Set/unset for transparent (non-rectangular) windows|
|isTopmost |bool| Always set/unset to topmost|
|isZoomed |bool| Maximize/unmaximize the window. Also, get the current state |
|isHitTestEnabled|bool| Enables/disables the automatic hit test. If enabled, isClickThrough will automatically change depending on the mouse cursor position. |
|isClickThrough|bool| Sets/unset the click-through state.|
|windowPosition|Vector2| Allows you to get/set the window position. The lower left corner of the main monitor is the origin and the coordinate system is positive upward, and the lower left corner of the window is the coordinate system.|
|windowSize|Vector2| You can get/set the window size.|
#### UniWindowMoveHandler.cs
If you attach this script to a UI element (which will be the Raycast Target), you can move the window by dragging that UI element.
For example, it is assumed to be attached to an image with a handle that says, "You can move by grabbing here.
Within the prefab called DragMoveCanvas, we use a Panel that covers the entire transparent screen.
By setting the Layer to "Ignore Raycast", the automatic hit test will be excluded even if the panel is a Raycast.
This allows dragging anywhere on the screen.
However, other UI operations will take precedence over dragging. (This is due to the smaller Sort Order in DragMoveCanvas.)
### Source folder hierarchy
If you just want to use this library, you can download .unitypackage in Release and do not need to clone this repository.
If you want to see/build the source, please refer to this.
- UniWinC
- This is a Unity project.
- It already contains built DLLs and bundles.
- The contents of this project are in the release as the .unitypackage.
- VisualStudio
- There is a solution to generate LibUniWinC.dll for Windows x86 and x64.
- Building with Release will overwrite the DLL under the Unity folder.
- A Windows Forms app project for testing is also included.
- Xcode
- There is a project to generate LibUniWinC.bundle for macOS.
- Building it will overwrite the .bundle under the Unity folder.
## Acknowledgements
- The macOS code is based on [Unity + Mac + Swift で透過最前面ウィンドウを作る](https://qiita.com/KRiver1/items/9ecf65759cf1349f56af) by かりばぁ.
- I used hecomi's [Unity で .unitypackage で配布していたアセットを Package Manager 対応してみた](https://tips.hecomi.com/entry/2021/10/29/001304) for generating UPM branches in GitHub Actions.
I would like to thank them.
================================================
FILE: UniWinC/.gitignore
================================================
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/
# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta
# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*
# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory
.vs/
# Gradle cache directory
.gradle/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.slnx
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db
*.vsconfig
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta
# Unity3D generated file on crash reports
sysinfo.txt
# Builds
*.apk
*.aab
*.unitypackage
# Crashlytics generated file
crashlytics-build.properties
# Packed Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*
# JetBrains
/.idea/
/Assets/Plugins/
/Assets/Plugins.meta
/Assets/Plugins/Editor/
/Assets/Plugins/Editor.meta
# for this project
!/Assets/Kirurobo/UniWindowController/Plugins/*
================================================
FILE: UniWinC/.vscode/extensions.json
================================================
{
"recommendations": [
"visualstudiotoolsforunity.vstuc"
]
}
================================================
FILE: UniWinC/.vscode/launch.json
================================================
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Unity",
"type": "vstuc",
"request": "attach"
}
]
}
================================================
FILE: UniWinC/.vscode/settings.json
================================================
{
"files.exclude": {
"**/.DS_Store": true,
"**/.git": true,
"**/.vs": true,
"**/.gitmodules": true,
"**/.vsconfig": true,
"**/*.booproj": true,
"**/*.pidb": true,
"**/*.suo": true,
"**/*.user": true,
"**/*.userprefs": true,
"**/*.unityproj": true,
"**/*.dll": true,
"**/*.exe": true,
"**/*.pdf": true,
"**/*.mid": true,
"**/*.midi": true,
"**/*.wav": true,
"**/*.gif": true,
"**/*.ico": true,
"**/*.jpg": true,
"**/*.jpeg": true,
"**/*.png": true,
"**/*.psd": true,
"**/*.tga": true,
"**/*.tif": true,
"**/*.tiff": true,
"**/*.3ds": true,
"**/*.3DS": true,
"**/*.fbx": true,
"**/*.FBX": true,
"**/*.lxo": true,
"**/*.LXO": true,
"**/*.ma": true,
"**/*.MA": true,
"**/*.obj": true,
"**/*.OBJ": true,
"**/*.asset": true,
"**/*.cubemap": true,
"**/*.flare": true,
"**/*.mat": true,
"**/*.meta": true,
"**/*.prefab": true,
"**/*.unity": true,
"build/": true,
"Build/": true,
"Library/": true,
"library/": true,
"obj/": true,
"Obj/": true,
"Logs/": true,
"logs/": true,
"ProjectSettings/": true,
"UserSettings/": true,
"temp/": true,
"Temp/": true
},
"dotnet.defaultSolution": "UniWinC.slnx"
}
================================================
FILE: UniWinC/Assets/InputSystem.inputsettings.asset
================================================
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3}
m_Name: InputSystem.inputsettings
m_EditorClassIdentifier:
m_SupportedDevices: []
m_UpdateMode: 1
m_MaxEventBytesPerUpdate: 5242880
m_MaxQueuedEventsPerUpdate: 1000
m_CompensateForScreenOrientation: 1
m_BackgroundBehavior: 0
m_EditorInputBehaviorInPlayMode: 0
m_DefaultDeadzoneMin: 0.125
m_DefaultDeadzoneMax: 0.925
m_DefaultButtonPressPoint: 0.5
m_ButtonReleaseThreshold: 0.75
m_DefaultTapTime: 0.2
m_DefaultSlowTapTime: 0.5
m_DefaultHoldTime: 0.4
m_TapRadius: 5
m_MultiTapDelayTime: 0.75
m_DisableRedundantEventsMerging: 0
m_ShortcutKeysConsumeInputs: 0
m_iOSSettings:
m_MotionUsage:
m_Enabled: 0
m_Description:
================================================
FILE: UniWinC/Assets/InputSystem.inputsettings.asset.meta
================================================
fileFormatVersion: 2
guid: dc660a2a123d34488abe1d07904475f4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/.gitignore
================================================
# Includes DLLs
!Plugins/Windows/*/*.dll
!Plugins/MacOS/*.bundle
!Plugins/MacOS/*.bundle/*
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/CHANGELOG.md
================================================
# Changelog
UniWindowController (UniWinC)
https://github.com/kirurobo/UniWindowController
<!---
How to write the changelog.
https://keepachangelog.com/ja/1.0.0/
--->
## [v0.9.8] - 2025-11-18
### Added
- Added IsFreePositioningEnabled property for macOS.
- Changed .bundle's signing to adhoc for macOS.
## [v0.9.7] - 2025-03-07
### Fixed
- Improved stability on macOS.
## [v0.9.6] - 2025-02-20
### Changed
- Replaced FindObjectOfType with FindAnyObjectByType.
### Fixed
- Fixed coordinate misalignment with Retina support on macOS.
## [v0.9.5] - 2025-02-18
### Changed
- Renamed asmdef Unity.UniWindowController to Kirurobo.UniWindowController.
- Renamed asmdef Unity.UniWindowController.Editor to Kirurobo.UniWindowController.Editor.
- Please remove if there are old files in the project.
### Fixed
- Fixed for support both of New Input System and Legacy Input Manager.
- Fixed wrong name "LeftCtrl" and "RightCtrl" in the code.
### Added
- Added GetClientRectangle() in the native plugins.
## [v0.9.4] - 2025-02-06
### Changed
- Support New Input System.
### Fixed
- Remember main camera's clear flags and background color before applying automatic camera background switch.
- To prevent errors on macOS, the save dialogue no longer displays a file type drop-down.
- Fixed a crash when setting the window to borderless on macOS if the screen was initially in full screen mode.
## [v0.9.3] - 2024-05-06
### Changed
- Rewrote the .bundle in Swift
## [v0.9.2] - 2023-09-18
### Fixed
- DllNotFoundException in the Unity Apple Silicon Editor
### Changed
- Added client size display to the UI sample
## [v0.9.1] - 2023-05-03
### Fixed
- Position of file type selection box on macOS
- GetClientSize() on macOS
## [v0.9.0] - 2023-04-22
### Changed
- The development environment has been updated to Unity 2020.3.43
### Fixed
- Fixed size shift when window frame is hidden in Unity 2020 on Windows
## [v0.8.6] - 2022-06-18
### Fixed
- Window shadow in macOS
## [v0.8.5] - 2021-12-12
### Fixed
- File type selection in macOS
## [v0.8.4] - 2021-11-27
### Changed
- Made the class singleton.
- All samples are bundled for package manager.
### Added
- File type selection in macOS
## [v0.8.3] - 2021-11-27
### Added
- SetAlphaValue
## [v0.8.2] - 2021-10-15
### Added
- FilePanel.OpenFilePanel()
- FilePanel.SaveFilePanel
### Fixed
- M1 may also be supported in macOS. (Not tested)
- Minor improvements to an issue of lost keystrokes when the window is transparent.
## [v0.8.1] - 2021-09-13
### Changed
- ***Renamed "Unity" folder to "UniWinC".***
for macOS.
- Use screen.frame intead of screen.visibleFrame.
- Use NSWindow.Level.popUpMenu instead of Level.floating to bring the window to the front of the menu bar.
## [v0.8.0] - 2020-12-27
### Added
- Fullscreen demo.
- Set to bottommost. (Experimental)
## [v0.7.0] - 2020-12-07
### Added
- Support Unity Package Manager.
### Changed
- Restructured folders.
## [v0.6.0] - 2020-12-06
### Added
- Files dropping for Mac and Windows.
- Prepare fit to monitor property.
### Changed
- macOS 10.12 and below is no longer supported.
- "Maximized" keyword was renamed to "Zoomed".
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/CHANGELOG.md.meta
================================================
fileFormatVersion: 2
guid: 2a3fc0316b219b443a628c9942d8615c
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Editor/Kirurobo.UniWindowController.Editor.asmdef
================================================
{
"name": "Kirurobo.UniWindowController.Editor",
"rootNamespace": "",
"references": [
"GUID:785f71526b4175240bb8e068347cab84"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Editor/Kirurobo.UniWindowController.Editor.asmdef.meta
================================================
fileFormatVersion: 2
guid: 4379ff61160dc9f44a938ad4192f6dca
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Editor/Scripts/UniWindowControllerBatch.cs
================================================
using UnityEngine;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
// ReSharper disable UnusedMember.Local
namespace Kirurobo
{
class UniWindowControllerBatch
{
//[MenuItem("Build/Build OSX")]
static void PerformBuild()
{
// コマンドライン引数の最後が出力パスだとする
//string outputPath = System.Environment.GetCommandLineArgs().Last();
// var buildPlayerOptions = new BuildPlayerOptions();
// buildPlayerOptions.scenes = sceneList.ToArray();
// buildPlayerOptions.locationPathName = outputPath;
// buildPlayerOptions.target = BuildTarget.StandaloneOSX;
// buildPlayerOptions.options = BuildOptions.None;
// 事前にエディタから設定したビルド設定を利用
var scenes = EditorBuildSettings.scenes;
var buildTarget = EditorUserBuildSettings.activeBuildTarget;
var locationPath = EditorUserBuildSettings.GetBuildLocation(buildTarget);
// ビルド対象は環境に合わせて上書き
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
buildTarget = BuildTarget.StandaloneOSX;
locationPath = "Builds/macOS/" + Application.productName;
#elif UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
buildTarget = BuildTarget.StandaloneWindows64;
locationPath = "Builds/Win64/" + Application.productName;
#endif
var buildPlayerOptions = new BuildPlayerOptions
{
scenes = EditorBuildSettingsScene.GetActiveSceneList(scenes),
locationPathName = locationPath,
target = buildTarget,
options = BuildOptions.None
};
// // 内容チェック用
// foreach (var scene in buildPlayerOptions.scenes)
// {
// Debug.Log(scene);
// }
// Debug.Log(buildPlayerOptions.locationPathName);
// return;
var report = BuildPipeline.BuildPlayer(buildPlayerOptions);
var summary = report.summary;
if (summary.result == BuildResult.Succeeded)
{
Debug.Log("Build succeeded");
} else if (summary.result == BuildResult.Failed)
{
Debug.Log("Build failed");
//EditorApplication.Exit(1);
throw new BuildFailedException(report.summary.ToString());
}
}
}
}
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Editor/Scripts/UniWindowControllerBatch.cs.meta
================================================
fileFormatVersion: 2
guid: 2014dd28aebdf44169eed3f90f3ab550
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Editor/Scripts/UniWindowControllerEditor.cs
================================================
/*
* UniWindowControllerEditor.cs
*
* Author: Kirurobo http://x.com/kirurobo
* License: MIT
*/
// Assembry Definition を有効にしてから、ビルド時に Editor クラスがないとエラーが出る。
// そこで丸ごと UNITY_EDITOR が無い場合は無視するものとした
#if UNITY_EDITOR
using System.Linq;
using UnityEngine;
using UnityEditor;
using System.Reflection;
using UnityEngine.Rendering;
namespace Kirurobo
{
/// <summary>
/// UniWindowControllerのためのエディタカスタマイズ部分
/// </summary>
[CustomEditor(typeof(UniWindowController))]
public class UniWindowControllerEditor : Editor
{
/// <summary>
/// カーソル下の色を表示するためのプロパティ
/// </summary>
SerializedProperty pickedColor;
/// <summary>
/// ゲームビューのウィンドウ
/// </summary>
private EditorWindow gameViewWindow;
/// <summary>
/// プロジェクト設定に関する警告を閉じておくか
private bool isWarningDismissed = false;
/// <summary>
/// URP に関する警告を閉じておくか
/// </summary>
private bool isUrpWarningDismissed = true;
/// <summary>
/// URP が有効かどうか
/// </summary>
private bool hasUrp = false;
void OnEnable()
{
LoadSettings();
pickedColor = serializedObject.FindProperty("pickedColor");
// URP が有効か否かを判定
hasUrp = GetUrpSettings();
}
void OnDisable()
{
SaveSettings();
}
/// <summary>
/// URPが有効か否かを検出
/// </summary>
/// <returns></returns>
private bool GetUrpSettings()
{
var renderPipelineAsset = GraphicsSettings.defaultRenderPipeline;
if (renderPipelineAsset == null || renderPipelineAsset.GetType().Name != "UniversalRenderPipelineAsset")
{
// URP が設定されていない
return false;
}
return true;
}
private void LoadSettings()
{
isWarningDismissed = EditorUserSettings.GetConfigValue("WindowController_IS_WARNING DISMISSED") == "1";
}
private void SaveSettings()
{
EditorUserSettings.SetConfigValue("WindowController_IS_WARNING DISMISSED", isWarningDismissed ? "1" : "0");
}
/// <summary>
/// インスペクタでの表示をカスタマイズ
/// </summary>
/// <description>
/// 参考情報および、推奨設定の変更欄を表示します。
/// </description>
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
// カーソル下の色が得られていれば、その透明度を参考として表示
if (pickedColor != null)
{
EditorGUI.BeginDisabledGroup(true);
EditorGUILayout.LabelField("Picked Alpha", pickedColor.colorValue.a.ToString("P0"));
EditorGUI.EndDisabledGroup();
}
// Project Settings の推奨設定を表示
isWarningDismissed = ShowPlayerSettingsValidation(isWarningDismissed);
// URP 関連の推奨設定を表示
isUrpWarningDismissed = ShowUrpSettingsValidation(isUrpWarningDismissed);
}
/// <summary>
/// Project Settings に関する推奨設定の自動設定欄を表示
/// </summary>
private bool ShowPlayerSettingsValidation(bool dismissed) {
// 以下は Project Settings 関連
EditorGUILayout.Space();
bool enableValidation = EditorGUILayout.Foldout(!dismissed, "Player Settings validation");
// チェックするかどうかを記憶
if (enableValidation == dismissed)
{
dismissed = !enableValidation;
}
// 推奨設定のチェック
//if (!isWarningDismissed)
if (enableValidation)
{
if (ValidateSettings(false))
{
// Apply all recommendation
GUI.backgroundColor = Color.green;
if (GUILayout.Button(
"✔ Fix all settings to recommended values",
GUILayout.MinHeight(25f)
))
{
ValidateSettings(true);
}
// Dismiss the validation
GUI.backgroundColor = Color.yellow;
if (GUILayout.Button(
"✘ Dismiss this validation",
GUILayout.MinHeight(25f)
))
{
dismissed = true;
//SaveSettings(); // Uncomment this if save you want to save immediately
}
EditorGUILayout.Space();
}
else
{
GUI.color = Color.green;
GUILayout.Label("OK!");
}
// Open the player settings page
EditorGUILayout.BeginHorizontal();
GUILayout.FlexibleSpace();
GUI.color = Color.white;
GUI.backgroundColor = Color.white;
if (GUILayout.Button(
"Open Player Settings",
GUILayout.MinHeight(25f), GUILayout.Width(200f)
))
{
SettingsService.OpenProjectSettings("Project/Player");
}
GUILayout.FlexibleSpace();
EditorGUILayout.EndHorizontal();
EditorGUILayout.Space();
}
return dismissed;
}
/// <summary>
/// URP に関する推奨設定の自動設定欄を表示
/// </summary>
private bool ShowUrpSettingsValidation(bool dismissed) {
// URP が無効ならば何もしない
if (!hasUrp) return dismissed;
// 以下は URP 関連の自動設定
EditorGUILayout.Space();
bool enableValidation = EditorGUILayout.Foldout(!dismissed, "URP Settings validation");
// チェックするかどうかを記憶
if (enableValidation == dismissed)
{
dismissed = !enableValidation;
}
// 推奨設定のチェック
//if (!isWarningDismissed)
if (enableValidation)
{
if (ValidateUrpSettings(false))
{
// Apply all recommendation
GUI.backgroundColor = Color.green;
if (GUILayout.Button(
"✔ Fix all settings to recommended values",
GUILayout.MinHeight(25f)
))
{
ValidateUrpSettings(true);
}
// Dismiss the validation
GUI.backgroundColor = Color.yellow;
if (GUILayout.Button(
"✘ Dismiss this validation",
GUILayout.MinHeight(25f)
))
{
dismissed = true;
}
EditorGUILayout.Space();
}
else
{
GUI.color = Color.green;
GUILayout.Label("OK!");
}
EditorGUILayout.Space();
}
return dismissed;
}
private delegate void FixMethod();
/// <summary>
/// Show or fix the setting
/// </summary>
/// <param name="message">Warning message</param>
/// <param name="fixAction"></param>
/// <param name="silentFix">false: show warning and fix button, true: fix without showing</param>
private void FixSetting(string message, FixMethod fixAction, bool silentFix = false)
{
if (silentFix)
{
// Fix
fixAction.Invoke();
}
else
{
// Show the message and a fix button
EditorGUILayout.BeginHorizontal();
EditorGUILayout.HelpBox(message, MessageType.Warning, true);
GUILayout.FlexibleSpace();
EditorGUILayout.BeginVertical();
EditorGUILayout.Space();
if (GUILayout.Button("Fix", GUILayout.Width(60f))) { fixAction.Invoke(); }
//GUILayout.FlexibleSpace();
EditorGUILayout.EndVertical();
EditorGUILayout.EndHorizontal();
}
}
/// <summary>
/// Show the recommendation only
/// </summary>
/// <param name="message">Warning message</param>
private void ShowInfo(string message, Object target = null)
{
// Show the message and a fix button
EditorGUILayout.BeginHorizontal();
EditorGUILayout.HelpBox(message, MessageType.Info, true);
GUILayout.FlexibleSpace();
// 自動設定できない対象は、プロジェクトウィンドウで示すのみ
if (target != null)
{
EditorGUILayout.BeginVertical();
EditorGUILayout.Space();
if (GUILayout.Button("Ping", GUILayout.Width(60f))) { EditorGUIUtility.PingObject(target); }
//GUILayout.FlexibleSpace();
EditorGUILayout.EndVertical();
}
EditorGUILayout.EndHorizontal();
}
/// <summary>
/// Validate player settings
/// </summary>
/// <param name="silentFix">false: show warning and fix button, true: fix without showing</param>
/// <returns>true if there are any invalid items</returns>
private bool ValidateSettings(bool silentFix = false)
{
bool invalid = false;
// バックグラウンドでも実行する。クリックスルー切替などで必要
if (!PlayerSettings.runInBackground)
{
invalid = true;
FixSetting(
"'Run in background' is highly recommended.",
() => PlayerSettings.runInBackground = true,
silentFix
);
}
// サイズ変更可能なウィンドウとする。必須ではないがウィンドウ枠無効時にサイズも変わるので変更可能である方が自然
if (!PlayerSettings.resizableWindow)
{
invalid = true;
FixSetting(
"'Resizable window' is recommended.",
() => PlayerSettings.resizableWindow = true,
silentFix
);
}
// フルスクリーンでなくウィンドウとする
#if UNITY_2018_1_OR_NEWER
// Unity 2018 からはフルスクリーン指定の仕様が変わった
if (PlayerSettings.fullScreenMode != FullScreenMode.Windowed)
{
invalid = true;
FixSetting(
"Chose 'Windowed' in 'Fullscreen Mode'.",
() => PlayerSettings.fullScreenMode = FullScreenMode.Windowed,
silentFix
);
}
#else
if (PlayerSettings.defaultIsFullScreen)
{
invalid = true;
FixSetting(
"'Default is full screen' is not recommended.",
() => PlayerSettings.defaultIsFullScreen = false,
silentFix
);
}
#endif
// フルスクリーンとウィンドウの切替を無効とする
if (PlayerSettings.allowFullscreenSwitch)
{
invalid = true;
FixSetting(
"Disallow fullscreen switch.",
() => PlayerSettings.allowFullscreenSwitch = false,
silentFix
);
}
// Windowsでは Use DXGI Flip Mode Swapchain を無効にしないと透過できない
// ↓Unity 2019.1.6未満だと useFlipModelSwapchain は無いはず
// なので除外のため書き連ねてあるが、ここまでサポートしなくて良い気もする。
#if UNITY_2019_1_6
#elif UNITY_2019_1_5
#elif UNITY_2019_1_4
#elif UNITY_2019_1_3
#elif UNITY_2019_1_2
#elif UNITY_2019_1_1
#elif UNITY_2019_1_0
#elif UNITY_2019_1_OR_NEWER
// Unity 2019.1.7 以降であれば、Player 設定 の Use DXGI Flip... 無効化を推奨
if (PlayerSettings.useFlipModelSwapchain)
{
invalid = true;
FixSetting(
"Disable 'Use DXGI Flip Mode Swapchain' to make the window transparent.",
() => PlayerSettings.useFlipModelSwapchain = false,
silentFix
);
}
// Direct3D12 は透過ウィンドウに対応していないので、Graphics APIs for Windows から除外することを推奨
if (PlayerSettings.GetUseDefaultGraphicsAPIs(BuildTarget.StandaloneWindows))
{
// 自動の場合も警告を出す
ShowInfo(
"Direct3D12 is not supported for transparent window. " +
"Please consider using Direct3D11 instead of the 'Auto Graphics API for Windows' setting in Player Settings.",
null
);
}
else if (PlayerSettings.GetGraphicsAPIs(BuildTarget.StandaloneWindows).Contains(GraphicsDeviceType.Direct3D12))
{
// Graphhics APIs for Windows に Direct3D12 が含まれている場合は警告を出す
ShowInfo(
"Direct3D12 is not supported for transparent window. " +
"Please remove Direct3D12 from 'Graphics APIs for Windows' in Player Settings.",
null
);
}
#endif
return invalid;
}
/// <summary>
/// Validate player settings
/// </summary>
/// <param name="silentFix">false: show warning and fix button, true: fix without showing</param>
/// <returns>true if there are any invalid items</returns>
private bool ValidateUrpSettings(bool silentFix = false)
{
bool invalid = false;
// Universal Render Pipelineが有効ならば、HDRの無効化を推奨
foreach (var cam in Camera.allCameras)
{
if (cam.allowHDR) {
string name = cam.name;
invalid = true;
FixSetting(
$"{name}: Disable 'HDR' in the camera to make the window transparent.",
() => cam.allowHDR = false,
silentFix
);
}
if (cam.allowMSAA) {
string name = cam.name;
invalid = true;
FixSetting(
$"{name}: Disable 'MSAA' in the camera to make the window transparent.",
() => cam.allowMSAA = false,
silentFix
);
}
}
var urpAsset = GraphicsSettings.defaultRenderPipeline;
if (hasUrp && urpAsset != null)
{
// hasUrp == true の時点で urpAsset は UniversalRenderPipelineAsset であるはず。そのため allowPostProcessAlphaOutput があるはず
var alphaProcessingProperty = urpAsset.GetType().GetProperty("allowPostProcessAlphaOutput", BindingFlags.Public | BindingFlags.Instance);
if (alphaProcessingProperty != null)
{
var alphaProcessing = alphaProcessingProperty.GetValue(urpAsset);
if (!(bool)alphaProcessing)
{
invalid = true;
ShowInfo(
"Turn on 'Alpha Processing' in the URP asset",
urpAsset
);
}
}
}
return invalid;
}
}
[CustomPropertyDrawer(typeof(ReadOnlyAttribute))]
public class UniWindowControllerReadOnlyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
GUI.enabled = false;
EditorGUI.PropertyField(position, property, label, true);
GUI.enabled = true;
}
}
/// <summary>
/// Set a bool property editable
/// Reference: http://ponkotsu-hiyorin.hateblo.jp/entry/2015/10/20/003042
/// Reference: https://forum.unity.com/threads/c-class-property-with-reflection-in-propertydrawer-not-saving-to-prefab.473942/
/// </summary>
[CustomPropertyDrawer(typeof(EditablePropertyAttribute))]
public class UniWindowControllerDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
//base.OnGUI(position, property, label);
Object obj = property.serializedObject.targetObject;
// Range(min, max) が設定されていれば取得
FieldInfo fieldInfo = obj.GetType().GetField(
property.name,
BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static
);
var rangeAttrs = fieldInfo?.GetCustomAttributes(typeof(RangeAttribute), true) as RangeAttribute[];
RangeAttribute range = (rangeAttrs?.Length > 0 ? rangeAttrs.First() : null);
if (EditorApplication.isPlayingOrWillChangePlaymode)
{
// 変数の先頭が '_' であることが動作の条件
if (property.name[0] == '_')
{
string propertyName = property.name.Substring(1); // '_' なしをプロパティ名として取得
PropertyInfo info = obj.GetType().GetProperty(propertyName);
MethodInfo getMethod = default(MethodInfo);
MethodInfo setMethod = default(MethodInfo);
if (info.CanRead) { getMethod = info.GetGetMethod(); }
if (info.CanWrite) { setMethod = info.GetSetMethod(); }
if (property.type == "bool")
{ var oldValue = property.boolValue;
if (getMethod != null)
{
oldValue = (bool)getMethod.Invoke(obj, null);
}
GUI.enabled = (setMethod != null);
EditorGUI.PropertyField(position, property, label, true);
GUI.enabled = true;
var newValue = property.boolValue;
if ((setMethod != null) && (oldValue != newValue))
{
setMethod.Invoke(obj, new[] { (object)newValue });
}
}
else if (property.type == "float")
{
var oldValue = property.floatValue;
if (getMethod != null)
{
oldValue = (float) getMethod.Invoke(obj, null);
}
GUI.enabled = (setMethod != null);
if (range != null)
{
EditorGUI.Slider(position, property, range.min, range.max, label);
}
else
{
EditorGUI.PropertyField(position, property, label, true);
}
GUI.enabled = true;
var newValue = property.floatValue;
if ((setMethod != null) && (oldValue != newValue))
{
setMethod.Invoke(obj, new[] {(object) newValue});
}
}
else
{
// bool, float 以外は今のところ非対応で Readonly とする
GUI.enabled = false;
EditorGUI.PropertyField(position, property, label, true);
GUI.enabled = true;
}
}
else
{
// Readonly
GUI.enabled = false;
EditorGUI.PropertyField(position, property, label, true);
GUI.enabled = true;
}
}
else
{
// Range 指定があればスライダー
if (range != null)
{
EditorGUI.Slider(position, property, range.min, range.max, label);
}
else
{
EditorGUI.PropertyField(position, property, label, true);
}
}
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return EditorGUI.GetPropertyHeight(property, label, true);
}
}
}
#endif
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Editor/Scripts/UniWindowControllerEditor.cs.meta
================================================
fileFormatVersion: 2
guid: 168ecf5237c13ad4bb159250b8844a4f
timeCreated: 1545989238
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Editor/Scripts.meta
================================================
fileFormatVersion: 2
guid: 6b954f68e26eeb84bbd93cec0bcc9339
folderAsset: yes
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Editor.meta
================================================
fileFormatVersion: 2
guid: dad4816674a57b84dba9fe5f0426e850
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/LICENSE.md
================================================
MIT License
Copyright (c) 2020 Kirurobo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/LICENSE.md.meta
================================================
fileFormatVersion: 2
guid: 1dc8c66666c365440a7da6a4f311f249
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/README-ja.md
================================================
# UniWindowController
Unified window controller for macOS and Windows
略称:UniWinC(ユニウィンク)
[](https://github.com/kirurobo/UniWindowController/blob/master/LICENSE)
<a href="https://flatt.tech/oss/gmo/trampoline" target="_blank"><img src="https://flatt.tech/assets/images/badges/gmo-oss.svg" height="20px"/></a>
### README
- [Japanese (日本語での説明)](README-ja.md)
- [English](README.md)
## 概要
Unity の Windows / macOS 向けビルドで、自ウィンドウの位置、サイズ、透過、枠非表示などをコントロールします。
また、ファイル、フォルダのドロップも受け付け可能にできます。
Windows、macOS それぞれではコード例やアセットが見つかりましたが、統一的に扱えるものが無さそうだったため作成しました。

https://twitter.com/i/status/1314440790945361920
## デモ
[UniWinC_VRM](https://github.com/kirurobo/UniWinC_VRM) にはビルドしたVRMファイルビューアーのサンプルを置いてあります。
## インストール
UPMの方法ですと、バージョンアップもUPMから行えるようになります。
A. Unity Package Manager (UPM) を利用する手順
1. Unity エディタの [Window]メニューから [Package Manager] を開く
2. [+] から [Add package from git URL...] を選択

3. https://github.com/kirurobo/UniWindowController.git#upm を入力して [Add] する

B. UnityPackage を利用する手順
1. [Release のページ](https://github.com/kirurobo/UniWindowController/releases) から .unitypackage ファイルをダウンロード
2. Unity エディタでインポート
## Unity プロジェクトでの利用
1. Runtime/Prefabs にある `UniWindowController` プレハブをシーンに追加
2. そこで配置された `UniWindowController` をインスペクターで確認
- Player Settings を適切に直す(緑のボタンでまとめて設定が変更されます)
- `IsTransparent` 等、設定をお好みに合わせる
3. 左ドラッグでウィンドウ自体を動かしたい場合、 Runtime/Prefabs の `DragMoveCanvas` プレハブも追加
- 動作には EventSystem が必要です。もしシーンに無ければ UI → Event System を追加してください。
4. PC / Mac スタンドアローンでビルドする
5. ビルドしたものを起動
### URP 利用時の設定
背景を透明にするためには、アルファチャンネルを維持する必要があります。
そのためにいくつかの条件があります。
- HDR は無効にする [参考](https://github.com/kirurobo/UniWindowController/issues/42#issuecomment-2507577260)
- Main Camera (GameObject) > Camera (Component) > Output > HDR: Off
- AlphaProcessing は有効にする [図](https://github.com/kirurobo/UniWindowController/issues/42#issuecomment-2601063168)
## 制限事項
- Direct3D12 では背景透過が有効となりません。Direct3D11 では `Use DXGI flip model swapchain for D3D11` を無効にすることで透過が可能です。
- Unityエディタ上では透過はできません。ビルドをしてお試しください。
- 常に最前面やウィンドウ移動等は動作しますが、実行中にゲームビューを閉じたりドッキングの配置を変えることはお勧めしません。一応、ゲームビューにフォーカスを移すとウィンドウを再取得はします。
- マウスでは良いのですが、タッチ操作には適切な対応がまだ定まっていません。
- Windows の場合、`TransparentType` を Alpha から ColorKey にすると、半透明の表現が失われる代わりにタッチ操作は自然になります。
- 複数ウィンドウには対応していません。
- 完全に動作検証ができている訳ではなく、不安定な動作もあるかもしれません。
既知の問題については [Issues](https://github.com/kirurobo/UniWindowController/issues) もご覧ください。
## 動作環境
- Unity: 2019 4.31f1 or later
- Scripting Runtime: .NET 4.x or later
- OS: Windows 10, Windows 11 or macOS
開発は Unity 2022.3.22f1, Windows 11 / macOS 15.3 で行っています
## 補足情報
### ヒットテストについて
正常にウィンドウを透過できると、あたかも長方形ではないウィンドウのように見えます。
ですがそれは見た目だけで、実は長方形のウィンドウとして存在しています。
そこで、マウスカーソルの直下を見て、透明ならばマウス操作を下のウィンドウに受け流す(クリックスルー)状態とし、不透明なら通常に戻す、という"ヒットテスト"を常に行なうことで、
あたかも見える部分しか存在しないように見せています。
このヒットテストについては2種類用意してあります。(自動ヒットテストを無効にして、自分で制御する、またはしないという選択も可能です。)
| Name | Method | Note |
|:-----|:-----|:------------|
|Opacity|透明度を見る|見た目と一致して自然だが、処理が重い|
|Raycast|Coliderを見る|より動作が軽いが、Coliderの用意が必要|
Raycastの方法の方がパフォーマンス的に推奨ですが、Coliderを忘れると触れなくなるため、デフォルトでは Opacity としています。
また注意として、タッチ操作だとあらかじめ指の下の色を確認できないため、操作に違和感を感じると思います。
どのように対応すべきかベストの解決策が見つかっていないため、タッチ対応に関してはすみませんが後回しとなっています。
### 透過方法について(Windowsのみ選択可)
タッチ操作に対応する一つの方法として、layered window の単色透過を選択できるようにしてあります。
これを選ぶと半透明が表現できず、パフォーマンスも落ちますが、ヒットテストをWindowsに任せるためタッチ操作に対しては感覚に一致するはずです。
| Name | Description | Note |
|:-----|:-----|:------------|
|Alpha|レンダリング結果の透明度を反映|こちらが標準|
|ColorKey|RGBが一致する一色のみ透過|パフォーマンス悪いが、タッチは自然|
### C# スクリプト
Unityで他のスクリプトから操作できるものです。
仕様は固まってはいないため、変更される場合があります。
#### UniWindowController.cs
本体です。
他のスクリプトから操作できるプロパティとして下記があります。(他にも追加されたりします。)
| Name | Type | Description |
|:-----|:-----|:------------|
|isTransparent|bool| 透過(非矩形)ウィンドウに設定/解除します|
|isTopmost |bool| 常に最前面に設定/解除します|
|isZoomed |bool| 最大化/解除をします。また現在の状態を取得します |
|isHitTestEnabled|bool| 自動ヒットテストを有効/無効にします。有効だとマウスカーソル位置により isClickThrough が自動で変化します。 |
|isClickThrough|bool| クリックスルー状態に設定/解除します|
|windowPosition|Vector2| ウインドウ位置を取得/設定できます。※メインモニタ左下が原点で上向き正の座標系で、ウィンドウ左下座標です |
|windowSize|Vector2| ウインドウサイズを取得/設定できます |
#### UniWindowMoveHandler.cs
このスクリプトをUI要素(Raycast Targetとなるもの)にアタッチしておくと、そのUI要素のドラッグでウィンドウを移動できるようになります。
例えば「ここを掴んで移動できます」というハンドルの画像にアタッチする想定です。
DragMoveCanvas というプレハブ内では、透明な全画面を覆うPanelを使っています。
このとき Layer を「Ignore Raycast」にすることで、自動ヒットテストが Raycast の場合でも対象外となります。
これにより画面のどこでもドラッグできるようになります。
ただし他のUI上の操作はドラッグでの移動より優先されます。(DragMoveCanvas で Sort Order を小さくしているため。)
#### LowLevel/FilePanel.cs
ファイル選択ダイアログを開く static メソッドがあります。
UniWindowController のインスタンスがなくても使えますが、その場合は呼んだ時点のウィンドウを親として開きます。
- FilePanel.OpenFilePanel()
- ファイルを開く場合の選択ダイアログ。複数選択も可能。
- FilePanel.SaveFilePanel()
- ファイルを保存する際の選択ダイアログ。
### ソースのフォルダ構成
利用するだけならば、Release にある unitypackage をダウンロードしていただけばよく、このリポジトリをクローンする必要はありません。
ソースを見たい/ビルドしたい場合は、このようになっていますので参照ください。
- UniWinC
- Unity のプロジェクトです。
- ビルド済みの DLL、bundle も既に含みます。
- ここの内容が unitypackage としてリリースにあります。
- VisualStudio
- Windows版 x86, x64 の LibUniWinC.dll を生成するソリューションがあります。
- Release でビルドすると Unity フォルダ下の DLL が上書きされます。
- テスト用Windowsフォームアプリのプロジェクトも含まれます。
- Xcode
- macOS版 LibUniWinC.bundle を生成するプロジェクトがあります。
- ビルドすると Unity フォルダ下の .bundle が上書きされます。
## 謝辞
- macOS側のコードは かりばぁ さんの [Unity + Mac + Swift で透過最前面ウィンドウを作る](https://qiita.com/KRiver1/items/9ecf65759cf1349f56af) をベースにさせていただきました。
- GitHub Actions での UPM ブランチ生成は hecomi さんの [Unity で .unitypackage で配布していたアセットを Package Manager 対応してみた](https://tips.hecomi.com/entry/2021/10/29/001304) を参考にしました。
この場を借りて感謝を申し上げます。
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/README-ja.md.meta
================================================
fileFormatVersion: 2
guid: 21cabbd334da95f4880bd34e4e08ddf8
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/README.md
================================================
# UniWindowController
Unified window controller for macOS and Windows
Abbreviation:UniWinC
[](https://github.com/kirurobo/UniWindowController/blob/master/LICENSE)
<a href="https://flatt.tech/oss/gmo/trampoline" target="_blank"><img src="https://flatt.tech/assets/images/badges/gmo-oss.svg" height="20px"/></a>
### README
- [Japanese (日本語での説明)](README-ja.md)
- [English](README.md)
## Overview
This is a library for apps built for Windows / macOS standalone with Unity.
This library controls transparency, borderless, position, size, etc. of its own window.
And it allows also accept file and folder drops.

https://twitter.com/i/status/1314440790945361920
## Demo
You can find a sample VRM viewer via [UniWinC_VRM](https://github.com/kirurobo/UniWinC_VRM).
## Installation
If you use the UPM, you can also perform version upgrades from UPM.
A. Using the Unity Package Manager (UPM)
1. Open [Package Manager] from the [Window] menu of the Unity Editor.
2. Select [+] and then select [Add package from git URL...].

3. Enter https://github.com/kirurobo/UniWindowController.git#upm and [Add].

B. Using an UnityPackage
1. Download an .unitypackage file from the [Release page](https://github.com/kirurobo/UniWindowController/releases).
2. Import the asset in the Unity Editor.
## Use in your Unity project
1. Add the `UniWindowController` prefab in the Runtime/Prefabs to your scene.
2. Select the `UniWindowController` placed scene, and watch the inspector.
- Fix the Player Settings appropriately (the green button will change all settings at once)
- Adjust the settings such as `IsTransparent` to your liking
3. Add `DragMoveCanvas` prefab in the Runtime/Prefabs if you want to move the window by mouse dragging.
- An EventSystem is required for this to work. If it is not present in your scene, add UI → Event System.
4. Build for PC / Mac standalone
5. Launch the build
### Settings when using URP
To make the background transparent, the alpha channel must be maintained.
There are some conditions for this.
- HDR must be disabled [Reference](https://github.com/kirurobo/UniWindowController/issues/42#issuecomment-2507577260)
- Main Camera (GameObject) > Camera (Component) > Output > HDR: Off
- AlphaProcessing must be enabled [Figure](https://github.com/kirurobo/UniWindowController/issues/42#issuecomment-2601063168)
## Limitations
- Background transparency is not enabled in Direct3D12; in Direct3D11, transparency can be enabled by disabling `Use DXGI flip model swapchain for D3D11`.
- Transparency is not available on the Unity Editor. Please build and try it.
- It works for topmost, moving windows, etc., but I do not recommend closing the game view or changing the docking arrangement while it is running. In the meantime, the window will reacquire when the focus is shifted to the game view.
- The proper support for touch operations has not yet been determined.
- On Windows, if you change the `TransparentType` from Alpha to ColorKey, you will lose the beautiful translucency, but the touch operation will be natural.
- Multiple windows are not supported.
- This has not been fully tested and there may be unstable behavior.
See also [Issues](https://github.com/kirurobo/UniWindowController/issues) for known issues.
## System requirements
- Unity: 2019 4.31f1 or later
- Scripting Runtime: .NET 4.x or later
- OS: Windows 10, Windows 11 or macOS
Development environment is Unity 2022.3.22f1, Windows 11 / macOS 15.3
## Additional information
### About the hit test
When the window is successfully made transparent, it looks as if it is a non-rectangular window.
However, this is only an appearance, and the window actually exists as a rectangular window.
Therefore, by looking directly under the mouse cursor, if it is transparent, the mouse operation is passed to the window below (click-through), and if it is opaque, the mouse operation is returned to normal,
If it is opaque, it returns to normal.
Two types of hit tests are available. (You can also choose to disable the automatic hit test and control it yourself or not.)
| Name | Method | Note |
|:-----|:-----|:------------|
|Opacity|Check transparency|Matches appearance and is natural, but heavy processing|
|Raycast|Check colider|Lightweight, but requires coliders|
The Raycast method is recommended in terms of performance, but if you forget colider, you will not be able to touch the screen, so the default is Opacity.
Also, note that touch operation may feel uncomfortable because you cannot see the color under your finger in advance.
Since we have not found the best solution for this, I'm sorry to say that touch support has been put on the back burner.
### About the transparency method (Seceltable only on Windows)
One way to support touch operation is to select monochromatic transparency for layered windows.
If this is selected, semi-transparency cannot be expressed and performance will be reduced, but since the hit test is left to Windows, it should match your senses for touch operation.
| Name | Description | Note |
|:-----|:-----|:------------|
|Alpha|Reflects transparency of rendering results|This is standard|
|ColorKey|Only one color with matching RGB is transparent|Poor performance, but touch is natural|
### C# scripting
This is something that can be manipulated from other scripts in Unity.
Specifications are not finalized and are subject to change.
#### UniWindowController.cs
This is the main script.
The following properties can be manipulated from other scripts. (Other properties may be added.)
| Name | Type | Description |
|:-----|:-----|:------------|
|isTransparent|bool| Set/unset for transparent (non-rectangular) windows|
|isTopmost |bool| Always set/unset to topmost|
|isZoomed |bool| Maximize/unmaximize the window. Also, get the current state |
|isHitTestEnabled|bool| Enables/disables the automatic hit test. If enabled, isClickThrough will automatically change depending on the mouse cursor position. |
|isClickThrough|bool| Sets/unset the click-through state.|
|windowPosition|Vector2| Allows you to get/set the window position. The lower left corner of the main monitor is the origin and the coordinate system is positive upward, and the lower left corner of the window is the coordinate system.|
|windowSize|Vector2| You can get/set the window size.|
#### UniWindowMoveHandler.cs
If you attach this script to a UI element (which will be the Raycast Target), you can move the window by dragging that UI element.
For example, it is assumed to be attached to an image with a handle that says, "You can move by grabbing here.
Within the prefab called DragMoveCanvas, we use a Panel that covers the entire transparent screen.
By setting the Layer to "Ignore Raycast", the automatic hit test will be excluded even if the panel is a Raycast.
This allows dragging anywhere on the screen.
However, other UI operations will take precedence over dragging. (This is due to the smaller Sort Order in DragMoveCanvas.)
### Source folder hierarchy
If you just want to use this library, you can download .unitypackage in Release and do not need to clone this repository.
If you want to see/build the source, please refer to this.
- UniWinC
- This is a Unity project.
- It already contains built DLLs and bundles.
- The contents of this project are in the release as the .unitypackage.
- VisualStudio
- There is a solution to generate LibUniWinC.dll for Windows x86 and x64.
- Building with Release will overwrite the DLL under the Unity folder.
- A Windows Forms app project for testing is also included.
- Xcode
- There is a project to generate LibUniWinC.bundle for macOS.
- Building it will overwrite the .bundle under the Unity folder.
## Acknowledgements
- The macOS code is based on [Unity + Mac + Swift で透過最前面ウィンドウを作る](https://qiita.com/KRiver1/items/9ecf65759cf1349f56af) by かりばぁ.
- I used hecomi's [Unity で .unitypackage で配布していたアセットを Package Manager 対応してみた](https://tips.hecomi.com/entry/2021/10/29/001304) for generating UPM branches in GitHub Actions.
I would like to thank them.
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/README.md.meta
================================================
fileFormatVersion: 2
guid: fb4787470f32f94428acbaf4cd01875d
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Kirurobo.UniWindowController.asmdef
================================================
{
"name": "Kirurobo.UniWindowController",
"rootNamespace": "",
"references": [
"GUID:75469ad4d38634e559750d17036d5f7c"
],
"includePlatforms": [
"Editor",
"macOSStandalone",
"WindowsStandalone32",
"WindowsStandalone64"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Kirurobo.UniWindowController.asmdef.meta
================================================
fileFormatVersion: 2
guid: 785f71526b4175240bb8e068347cab84
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Plugins/MacOS/LibUniWinC.bundle/Contents/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>25C56</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>LibUniWinC</string>
<key>CFBundleIdentifier</key>
<string>com.kirurobo.LibUniWinC</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>LibUniWinC</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.9.8</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>25B74</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>26.1</string>
<key>DTSDKBuild</key>
<string>25B74</string>
<key>DTSDKName</key>
<string>macosx26.1</string>
<key>DTXcode</key>
<string>2610</string>
<key>DTXcodeBuild</key>
<string>17B55</string>
<key>LSMinimumSystemVersion</key>
<string>11.0</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019-2025 kirurobo. All rights reserved.</string>
</dict>
</plist>
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Plugins/MacOS/LibUniWinC.bundle/Contents/_CodeSignature/CodeResources
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict/>
<key>files2</key>
<dict/>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Plugins/MacOS/LibUniWinC.bundle.meta
================================================
fileFormatVersion: 2
guid: fe2ad2bcb94714ffc888f3e1f03ccdec
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
DefaultValueInitialized: true
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Plugins/MacOS.meta
================================================
fileFormatVersion: 2
guid: d748bcfa85c1348c28b564cd6ac37b19
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Plugins/Windows/x64/LibUniWinC.dll.meta
================================================
fileFormatVersion: 2
guid: c6c54ba480bd9a849b4ac7726fd0e0b8
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux: 0
Exclude Linux64: 0
Exclude LinuxUniversal: 0
Exclude OSXUniversal: 0
Exclude Win: 1
Exclude Win64: 0
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: None
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Plugins/Windows/x64.meta
================================================
fileFormatVersion: 2
guid: 8993db1768570f54ba2e55c434fcbba6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Plugins/Windows/x86/LibUniWinC.dll.meta
================================================
fileFormatVersion: 2
guid: 56ecac4e2cbf9ee47a811187740e0cd7
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: x86
DefaultValueInitialized: true
- first:
Facebook: Win
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Linux
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: LinuxUniversal
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Plugins/Windows/x86.meta
================================================
fileFormatVersion: 2
guid: 3237602cc6b253f46a849323dedb9710
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Plugins/Windows.meta
================================================
fileFormatVersion: 2
guid: d6bda42304b999c4abbc168be20f11bf
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Plugins.meta
================================================
fileFormatVersion: 2
guid: 1b2fb2965b4b647beb75e5d55e9c8d6b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Prefabs/DragMoveCanvas.prefab
================================================
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &9167954367597434767
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9167954367597434766}
- component: {fileID: 9167954367597434803}
- component: {fileID: 9167954367597434764}
- component: {fileID: 9167954367597434765}
m_Layer: 2
m_Name: WindowMoveHandle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9167954367597434766
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9167954367597434767}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 9167954367673589915}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9167954367597434803
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9167954367597434767}
m_CullTransparentMesh: 0
--- !u!114 &9167954367597434764
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9167954367597434767}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &9167954367597434765
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9167954367597434767}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e7879148f4ed9cc42aa2ef8f22bf92c0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &9167954367673589911
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9167954367673589915}
- component: {fileID: 9167954367673589908}
- component: {fileID: 9167954367673589909}
- component: {fileID: 9167954367673589910}
m_Layer: 5
m_Name: DragMoveCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9167954367673589915
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9167954367673589911}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 9167954367597434766}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!223 &9167954367673589908
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9167954367673589911}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 1
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: -99
m_TargetDisplay: 0
--- !u!114 &9167954367673589909
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9167954367673589911}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!114 &9167954367673589910
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9167954367673589911}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Prefabs/DragMoveCanvas.prefab.meta
================================================
fileFormatVersion: 2
guid: d7dcf50428b152040847878685fe0746
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Prefabs/UniWindowController.prefab
================================================
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2416199871598626844
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2416199871598626842}
- component: {fileID: 2416199871598626845}
m_Layer: 0
m_Name: UniWindowController
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2416199871598626842
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2416199871598626844}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2416199871598626845
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2416199871598626844}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: eb951500192d2430eb3e306480cc2f31, type: 3}
m_Name:
m_EditorClassIdentifier:
_isTransparent: 0
_isTopmost: 0
_isZoomed: 0
isHitTestEnabled: 1
hitTestType: 1
opacityThreshold: 0.1
forceWindowed: 0
transparentType: 1
keyColor:
serializedVersion: 2
rgba: 65537
onObject: 1
pickedColor: {r: 0, g: 0, b: 0, a: 0}
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Prefabs/UniWindowController.prefab.meta
================================================
fileFormatVersion: 2
guid: e893aefd93740714b999573b02916984
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Prefabs.meta
================================================
fileFormatVersion: 2
guid: be7b28427840aa54ba08d1727ca5503b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/LowLevel/FilePanel.cs
================================================
using AOT;
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace Kirurobo
{
/// <summary>
/// Provides static methods to open native file dialog
/// </summary>
public class FilePanel
{
protected class LibUniWinC
{
[DllImport("LibUniWinC", CharSet = CharSet.Unicode)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool OpenFilePanel(in PanelSettings settings, [MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder buffer, UInt32 bufferSize);
[DllImport("LibUniWinC", CharSet = CharSet.Unicode)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool OpenSavePanel(in PanelSettings settings, [MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder buffer, UInt32 bufferSize);
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct PanelSettings : IDisposable {
public Int32 structSize;
public Int32 flags;
public IntPtr lpszTitle;
public IntPtr lpszFilter;
public IntPtr lpszInitialFile;
public IntPtr lpszInitialDir;
public IntPtr lpszDefaultExt;
public PanelSettings(Settings settings)
{
this.structSize = 0;
//this.structSize = 4 * 2 + Marshal.SizeOf<IntPtr>() * 3;
this.flags = (Int32)settings.flags;
//this.lpTitleText = IntPtr.Zero;
//this.lpFilterText = IntPtr.Zero;
//this.lpDefaultPath = IntPtr.Zero;
this.lpszTitle = Marshal.StringToHGlobalUni(settings.title);
this.lpszFilter = Marshal.StringToHGlobalUni(Filter.Join(settings.filters));
this.lpszInitialFile = Marshal.StringToHGlobalUni(settings.initialFile);
this.lpszInitialDir = Marshal.StringToHGlobalUni(settings.initialDirectory);
//this.lpszDefaultExt = Marshal.StringToHGlobalUni(settings.defaultExtension);
this.lpszDefaultExt = IntPtr.Zero;
//this.structSize = Marshal.SizeOf(this);
this.structSize = Marshal.SizeOf(this);
}
public void Dispose()
{
if (this.lpszTitle != IntPtr.Zero)
{
Marshal.FreeHGlobal(lpszTitle);
this.lpszTitle = IntPtr.Zero;
}
if (this.lpszFilter!= IntPtr.Zero)
{
Marshal.FreeHGlobal(lpszFilter);
this.lpszFilter= IntPtr.Zero;
}
if (this.lpszInitialFile!= IntPtr.Zero)
{
Marshal.FreeHGlobal(lpszInitialFile);
this.lpszInitialFile= IntPtr.Zero;
}
if (this.lpszInitialDir != IntPtr.Zero)
{
Marshal.FreeHGlobal(lpszInitialDir);
this.lpszInitialDir = IntPtr.Zero;
}
if (this.lpszDefaultExt != IntPtr.Zero)
{
Marshal.FreeHGlobal(lpszDefaultExt);
this.lpszDefaultExt = IntPtr.Zero;
}
}
}
}
/// <summary>
/// ダイアログの設定フラグ
/// </summary>
[Flags]
public enum Flag
{
None = 0,
FileMustExist = 1, // Windows only
FolderMustExist = 2, // Windows only
AllowMultipleSelection = 4,
CanCreateDirectories = 16,
OverwritePrompt = 256, // Always enabled on macOS
CreatePrompt = 512, // Always enabled on macOS
ShowHiddenFiles = 4096,
RetrieveLink = 8192,
}
/// <summary>
/// Parameters for file dialog
/// </summary>
public struct Settings
{
public string title;
public Filter[] filters;
public string initialDirectory;
public string initialFile;
public string defaultExtension; // Not implemented
public Flag flags;
}
/// <summary>
/// File filter
/// </summary>
public class Filter
{
protected string title;
protected string[] extensions;
/// <summary>
///
/// </summary>
/// <param name="title">Filter title. (Not available on macOS yet)</param>
/// <param name="extensions">Extensions like ["png", "jpg", "txt"]</param>
public Filter(string title, params string[] extensions)
{
this.title = title;
this.extensions = extensions;
}
public override string ToString()
{
return title + "\t" + String.Join("\t", extensions);
}
/// <summary>
/// Returns converted string from Filter array
/// </summary>
/// <param name="filters"></param>
/// <returns></returns>
public static string Join(Filter[] filters)
{
if (filters == null) return "";
string result = "";
bool isFirstItem = true;
foreach (var filter in filters) {
if (!isFirstItem) result += "\n";
result += filter.ToString();
isFirstItem = false;
}
return result;
}
}
/// <summary>
/// ファイルやフォルダ―のパス受け渡しUTF-16バッファの文字数
/// 複数パスが改行区切りで入るため 260 では少ない。
/// </summary>
private const int pathBufferSize = 2560;
/// <summary>
/// Open file selection dialog
/// </summary>
/// <param name="settings"></param>
/// <param name="action"></param>
public static void OpenFilePanel(Settings settings, Action<string[]> action)
{
LibUniWinC.PanelSettings ps = new LibUniWinC.PanelSettings(settings);
StringBuilder sb = new StringBuilder(pathBufferSize);
if (LibUniWinC.OpenFilePanel(in ps, sb, (uint)sb.Capacity))
{
string[] files = UniWinCore.parsePaths(sb.ToString());
action.Invoke(files);
}
ps.Dispose(); // Settings を渡したコンストラクタでメモリが確保されるため、解放が必要
}
/// <summary>
/// Open save-file selection dialog
/// </summary>
/// <param name="settings"></param>
/// <param name="action"></param>
public static void SaveFilePanel(Settings settings, Action<string[]> action)
{
LibUniWinC.PanelSettings ps = new LibUniWinC.PanelSettings(settings);
StringBuilder sb = new StringBuilder(pathBufferSize);
if (LibUniWinC.OpenSavePanel(in ps, sb, (uint)sb.Capacity))
{
string[] files = UniWinCore.parsePaths(sb.ToString());
action.Invoke(files);
}
ps.Dispose(); // Settings を渡したコンストラクタでメモリが確保されるため、解放が必要
}
}
}
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/LowLevel/FilePanel.cs.meta
================================================
fileFormatVersion: 2
guid: 176fb446df68d42f48d87354c9ef27d4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/LowLevel/UniWinCore.cs
================================================
/*
* UniWinCore.cs
*
* Author: Kirurobo http://twitter.com/kirurobo
* License: MIT
*/
using System;
using System.Runtime.InteropServices;
using AOT;
using UnityEngine;
using System.Text;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Kirurobo
{
/// <summary>
/// Native plugin wrapper for LibUniWinC
/// </summary>
internal class UniWinCore : IDisposable
{
/// <summary>
/// Type of transparent method for Windows only
/// </summary>
public enum TransparentType : int
{
None = 0,
Alpha = 1,
ColorKey = 2,
}
/// <summary>
/// State changed event type (Experimental)
/// </summary>
[Flags]
public enum WindowStateEventType : int
{
None = 0,
StyleChanged = 1,
Resized = 2,
// 以降は仕様変更もありえる
TopMostEnabled = 16 + 1 + 8,
TopMostDisabled = 16 + 1,
BottomMostEnabled = 32 + 1 + 8,
BottomMostDisabled = 32 + 1,
WallpaperModeEnabled = 64 + 1 + 8,
WallpaperModeDisabled = 64 + 1,
};
#region Native functions
protected class LibUniWinC
{
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void StringCallback([MarshalAs(UnmanagedType.LPWStr)] string returnString);
[UnmanagedFunctionPointer((CallingConvention.Winapi))]
public delegate void IntCallback([MarshalAs(UnmanagedType.I4)] int value);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool IsActive();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool IsTransparent();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool IsBorderless();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool IsTopmost();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool IsBottommost();
[DllImport("LibUniWinC", CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool IsMaximized();
[DllImport("LibUniWinC", CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool IsFreePositioningEnabled();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool AttachMyWindow();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool AttachMyOwnerWindow();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool AttachMyActiveWindow();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool DetachWindow();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern void Update();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern void SetTransparent([MarshalAs(UnmanagedType.U1)] bool bEnabled);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern void SetBorderless([MarshalAs(UnmanagedType.U1)] bool bEnabled);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern void SetAlphaValue(float alpha);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern void SetClickThrough([MarshalAs(UnmanagedType.U1)] bool bEnabled);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern void SetTopmost([MarshalAs(UnmanagedType.U1)] bool bEnabled);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern void SetBottommost([MarshalAs(UnmanagedType.U1)] bool bEnabled);
[DllImport("LibUniWinC", CallingConvention = CallingConvention.Winapi)]
public static extern void SetMaximized([MarshalAs(UnmanagedType.U1)] bool bZoomed);
[DllImport("LibUniWinC", CallingConvention = CallingConvention.Winapi)]
public static extern void EnableFreePositioning([MarshalAs(UnmanagedType.U1)] bool bEnabled);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern void SetPosition(float x, float y);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetPosition(out float x, out float y);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern void SetSize(float x, float y);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetSize(out float x, out float y);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetClientSize(out float width, out float height);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetClientRectangle(out float x, out float y, out float width, out float height);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool RegisterDropFilesCallback([MarshalAs(UnmanagedType.FunctionPtr)] StringCallback callback);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool UnregisterDropFilesCallback();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool RegisterMonitorChangedCallback([MarshalAs(UnmanagedType.FunctionPtr)] IntCallback callback);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool UnregisterMonitorChangedCallback();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool RegisterWindowStyleChangedCallback([MarshalAs(UnmanagedType.FunctionPtr)] IntCallback callback);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool UnregisterWindowStyleChangedCallback();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SetAllowDrop([MarshalAs(UnmanagedType.U1)] bool enabled);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern int GetCurrentMonitor();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern int GetMonitorCount();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetMonitorRectangle(int index, out float x, out float y, out float width, out float height);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern void SetCursorPosition(float x, float y);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetCursorPosition(out float x, out float y);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern int GetMouseButtons();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern int GetModifierKeys();
#region Working on Windows only
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern void SetTransparentType(int type);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern void SetKeyColor(uint colorref);
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
public static extern int GetDebugInfo();
[DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool AttachWindowHandle(IntPtr hWnd);
#endregion
}
#endregion
static string[] lastDroppedFiles;
static bool wasDropped = false;
static bool wasMonitorChanged = false;
static bool wasWindowStyleChanged = false;
static WindowStateEventType windowStateEventType = WindowStateEventType.None;
#if UNITY_EDITOR
/// <summary>
/// Get the Unity editor window
/// </summary>
/// <returns></returns>
/// <seealso href="http://baba-s.hatenablog.com/entry/2017/09/17/135018"/>
public static EditorWindow GetGameView()
{
var assembly = typeof(EditorWindow).Assembly;
var type = assembly.GetType("UnityEditor.GameView");
var gameView = EditorWindow.GetWindow(type);
return gameView;
}
#endif
/// <summary>
/// Determines whether a window is attached and available
/// </summary>
/// <value><c>true</c> if this instance is active; otherwise, <c>false</c>.</value>
public bool IsActive { get; private set; } = false;
/// <summary>
/// Determines whether the attached window is always on the front
/// </summary>
public bool IsTopmost { get { return (IsActive && _isTopmost); } }
private bool _isTopmost = false;
/// <summary>
/// Determines whether the attached window is always on the bottom
/// </summary>
public bool IsBottommost { get { return (IsActive && _isBottommost); } }
private bool _isBottommost = false;
/// <summary>
/// Determines whether the attached window is transparent
/// </summary>
public bool IsTransparent { get { return (IsActive && _isTransparent); } }
private bool _isTransparent = false;
/// <summary>
/// Determines whether the attached window is click-through (i.e., does not receive any mouse action)
/// </summary>
public bool IsClickThrough { get { return (IsActive && _isClickThrough); } }
private bool _isClickThrough = false;
/// <summary>
/// Determines whether the attached window is borderless (no title bar and borders)
/// </summary>
public bool IsBorderless { get { return (IsActive && _isBorderless); } }
private bool _isBorderless = false;
/// <summary>
/// Determines whether the attached window can be freely positioned (macOS only)
/// </summary>
public bool IsFreePositioningEnabled { get { return (IsActive && _isFreePositioningEnabled); } }
private bool _isFreePositioningEnabled = false;
/// <summary>
/// Type of transparent method for Windows
/// </summary>
private TransparentType transparentType = TransparentType.Alpha;
/// <summary>
/// The color to use for transparency when the transparentType is ColorKey
/// </summary>
private Color32 keyColor = new Color32(1, 0, 1, 0);
#region Constructor or destructor
/// <summary>
/// ウィンドウ制御のコンストラクタ
/// </summary>
public UniWinCore()
{
IsActive = false;
}
/// <summary>
/// デストラクタ
/// </summary>
~UniWinCore()
{
Dispose();
}
/// <summary>
/// 終了時の処理
/// </summary>
public void Dispose()
{
// 最後にウィンドウ状態を戻すとそれが目についてしまうので、あえて戻さないことにしてみるためコメントアウト
//DetachWindow();
// Instead of DetachWindow()
LibUniWinC.UnregisterDropFilesCallback();
LibUniWinC.UnregisterMonitorChangedCallback();
LibUniWinC.UnregisterWindowStyleChangedCallback();
}
#endregion
#region Callbacks
/// <summary>
/// モニタまたは解像度が変化したときのコールバック
/// この中での処理は最低限にするため、フラグを立てるのみ
/// </summary>
/// <param name="monitorCount"></param>
[MonoPInvokeCallback(typeof(LibUniWinC.IntCallback))]
private static void _monitorChangedCallback([MarshalAs(UnmanagedType.I4)] int monitorCount)
{
wasMonitorChanged = true;
}
/// <summary>
/// ウィンドウスタイルや最大化、最小化等で呼ばれるコールバック
/// この中での処理は最低限にするため、フラグを立てるのみ
/// </summary>
/// <param name="e"></param>
[MonoPInvokeCallback(typeof(LibUniWinC.IntCallback))]
private static void _windowStyleChangedCallback([MarshalAs(UnmanagedType.I4)] int e)
{
wasWindowStyleChanged = true;
windowStateEventType = (WindowStateEventType)e;
}
/// <summary>
/// ファイル、フォルダがドロップされた時に呼ばれるコールバック
/// 文字列を配列に直すことと、フラグを立てるまで行う
/// </summary>
/// <param name="paths"></param>
[MonoPInvokeCallback(typeof(LibUniWinC.StringCallback))]
private static void _dropFilesCallback([MarshalAs(UnmanagedType.LPWStr)] string paths)
{
// LF 区切りで届いた文字列を分割してパスの配列に直す
//char[] delimiters = { '\n', '\0' };
//string[] files = paths.Split(delimiters).Where(s => s != "").ToArray();
string[] files = parsePaths(paths);
if (files.Length > 0)
{
lastDroppedFiles = new string[files.Length];
files.CopyTo(lastDroppedFiles, 0);
wasDropped = true;
}
}
/// <summary>
/// ダブルクオーテーション囲み、LF(またはnull)区切りの文字列を配列に直して返す
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
internal static string[] parsePaths(string text)
{
System.Collections.Generic.List<string> list = new System.Collections.Generic.List<string>();
bool inEscaped = false;
int len = text.Length;
StringBuilder sb = new StringBuilder();
for (int i = 0; i < len; i++)
{
char c = text[i];
if (c == '"')
{
if (inEscaped)
{
if (((i + 1) < len) && text[i + 1] == '"')
{
i++;
sb.Append(c); // 連続ダブルクォーテーションは1つのダブルクオーテーションとする
continue;
}
}
inEscaped = !inEscaped; // 連続でなければ囲み内か否かの切り替え
}
else if (c == '\n')
{
if (inEscaped)
{
// 囲み内ならパスの一部とする
sb.Append(c);
}
else
{
// 囲み内でなければ、区切りとして、次のパスに移る
if (sb.Length > 0)
{
list.Add(sb.ToString());
//sb.Clear(); // for .NET 4 or later
sb.Length = 0; // for .NET 2
}
}
}
else if (c == '\0')
{
// ヌル文字は、常に区切りとして、次のパスに移る
if (sb.Length > 0)
{
list.Add(sb.ToString());
//sb.Clear(); // for .NET 4 or later
sb.Length = 0; // for .NET 2
}
}
else
{
sb.Append(c);
}
}
if (sb.Length > 0)
{
list.Add(sb.ToString());
}
// 空文字列の要素は除去
list.RemoveAll(v => v.Length == 0);
return list.ToArray();
}
#endregion
#region Find, attach or detach
/// <summary>
/// ウィンドウ状態を最初に戻して操作対象から解除
/// </summary>
public void DetachWindow()
{
#if UNITY_EDITOR
// エディタの場合、ウィンドウスタイルでは常に最前面と得られていない可能性があるため、
// 最前面ではないのが本来と決め打ちで、デタッチ時無効化する
EnableTopmost(false);
#endif
LibUniWinC.DetachWindow();
}
/// <summary>
/// 自分のウィンドウ(ゲームビューが独立ウィンドウならそれ)を探して操作対象とする
/// </summary>
/// <returns></returns>
public bool AttachMyWindow()
{
#if UNITY_EDITOR_WIN
// 確実にゲームビューを得る方法がなさそうなので、フォーカスを与えて直後にアクティブなウィンドウを取得
var gameView = GetGameView();
if (gameView)
{
gameView.Focus();
LibUniWinC.AttachMyActiveWindow();
}
#else
LibUniWinC.AttachMyWindow();
#endif
// Add event handlers
LibUniWinC.RegisterDropFilesCallback(_dropFilesCallback);
LibUniWinC.RegisterMonitorChangedCallback(_monitorChangedCallback);
LibUniWinC.RegisterWindowStyleChangedCallback(_windowStyleChangedCallback);
IsActive = LibUniWinC.IsActive();
return IsActive;
}
public bool AttachWindowHandle(IntPtr hWnd)
{
LibUniWinC.AttachWindowHandle(hWnd);
IsActive = LibUniWinC.IsActive();
return IsActive;
}
/// <summary>
/// 自分のプロセスで現在アクティブなウィンドウを選択
/// エディタの場合、ウィンドウが閉じたりドッキングしたりするため、フォーカス時に呼ぶ
/// </summary>
/// <returns></returns>
public bool AttachMyActiveWindow()
{
LibUniWinC.AttachMyActiveWindow();
IsActive = LibUniWinC.IsActive();
return IsActive;
}
#endregion
#region About window status
/// <summary>
/// Call this periodically to maintain window style
/// </summary>
public void Update()
{
LibUniWinC.Update();
}
string GetDebubgWindowSizeInfo()
{
float x, y, cx, cy;
LibUniWinC.GetSize(out x, out y);
LibUniWinC.GetClientSize(out cx, out cy);
return $"W:{x},H:{y} CW:{cx},CH:{cy}";
}
/// <summary>
/// 透過を設定/解除
/// </summary>
/// <param name="isTransparent"></param>
public void EnableTransparent(bool isTransparent)
{
// エディタは透過できなかったり、枠が通常と異なるのでスキップ
#if !UNITY_EDITOR
LibUniWinC.SetTransparent(isTransparent);
LibUniWinC.SetBorderless(isTransparent);
#endif
this._isTransparent = isTransparent;
}
/// <summary>
/// Set the window alpha
/// </summary>
/// <param name="alpha">0.0 - 1.0</param>
public void SetAlphaValue(float alpha)
{
// Windowsのエディタでは、一度半透明にしてしまうと表示が更新されなくなるため無効化。MacならOK
#if !UNITY_EDITOR_WIN
LibUniWinC.SetAlphaValue(alpha);
#endif
}
/// <summary>
/// Set the window z-order (Topmost or not).
/// </summary>
/// <param name="isTopmost">If set to <c>true</c> is top.</param>
public void EnableTopmost(bool isTopmost)
{
LibUniWinC.SetTopmost(isTopmost);
this._isTopmost = isTopmost;
this._isBottommost = false; // Exclusive
}
/// <summary>
/// Set the window z-order (Bottommost or not).
/// </summary>
/// <param name="isBottommost">If set to <c>true</c> is bottom.</param>
public void EnableBottommost(bool isBottommost)
{
LibUniWinC.SetBottommost(isBottommost);
this._isBottommost = isBottommost;
this._isTopmost = false; // Exclusive
}
/// <summary>
/// クリックスルーを設定/解除
/// </summary>
/// <param name="isThrough"></param>
public void EnableClickThrough(bool isThrough)
{
// エディタでクリックスルーされると操作できなくなる可能性があるため、スキップ
#if !UNITY_EDITOR
LibUniWinC.SetClickThrough(isThrough);
#endif
this._isClickThrough = isThrough;
}
/// <summary>
/// ウィンドウを最大化(Macではズーム)する
/// 最大化された後にサイズ変更がされることもあり、現状、確実には動作しない可能性があります
/// </summary>
public void SetZoomed(bool isZoomed)
{
LibUniWinC.SetMaximized(isZoomed);
}
/// <summary>
/// ウィンドウが最大化(Macではズーム)されているかを取得
/// 最大化された後にサイズ変更がされることもあり、現状、確実には動作しない可能性があります
/// </summary>
public bool GetZoomed()
{
return LibUniWinC.IsMaximized();
}
/// <summary>
/// Set the window position.
/// </summary>
/// <param name="position">Position.</param>
public void SetWindowPosition(Vector2 position)
{
LibUniWinC.SetPosition(position.x, position.y);
}
/// <summary>
/// Get the window position.
/// </summary>
/// <returns>The position.</returns>
public Vector2 GetWindowPosition()
{
Vector2 pos = Vector2.zero;
LibUniWinC.GetPosition(out pos.x, out pos.y);
return pos;
}
/// <summary>
/// Set the window size.
/// </summary>
/// <param name="size">x is width and y is height</param>
public void SetWindowSize(Vector2 size)
{
LibUniWinC.SetSize(size.x, size.y);
}
/// <summary>
/// Get the window Size.
/// </summary>
/// <returns>x is width and y is height</returns>
public Vector2 GetWindowSize()
{
Vector2 size = Vector2.zero;
LibUniWinC.GetSize(out size.x, out size.y);
return size;
}
/// <summary>
/// Get the client area ize.
/// </summary>
/// <returns>x is width and y is height</returns>
public Vector2 GetClientSize()
{
Vector2 size = Vector2.zero;
LibUniWinC.GetClientSize(out size.x, out size.y);
return size;
}
/// <summary>
/// Get the client area ize.
/// </summary>
/// <returns>x is width and y is height</returns>
public Rect GetClientRectangle()
{
Vector2 pos = Vector2.zero;
Vector2 size = Vector2.zero;
LibUniWinC.GetClientRectangle(out pos.x, out pos.y, out size.x, out size.y);
return new Rect(pos.x, pos.y, size.x, size.y);
}
#endregion
#region File opening
public void SetAllowDrop(bool enabled)
{
LibUniWinC.SetAllowDrop(enabled);
}
#endregion
#region Event observers
/// <summary>
/// Check files dropping and unset the dropped flag
/// </summary>
/// <param name="files"></param>
/// <returns>true if files were dropped</returns>
public bool ObserveDroppedFiles(out string[] files)
{
files = lastDroppedFiles;
if (!wasDropped || files == null) return false;
wasDropped = false;
return true;
}
/// <summary>
/// Check the numbers of display or resolution changing, and unset the flag
/// </summary>
/// <returns>true if changed</returns>
public bool ObserveMonitorChanged()
{
if (!wasMonitorChanged) return false;
wasMonitorChanged = false;
return true;
}
/// <summary>
/// Check window style was changed, and unset the flag
/// </summary>
/// <returns>True if window styel was changed</returns>
public bool ObserveWindowStyleChanged()
{
if (!wasWindowStyleChanged) return false;
windowStateEventType = WindowStateEventType.None;
wasWindowStyleChanged = false;
return true;
}
/// <summary>
/// Check window style was changed, and unset the flag
/// </summary>
/// <returns>True if window styel was changed</returns>
public bool ObserveWindowStyleChanged(out WindowStateEventType type)
{
if (!wasWindowStyleChanged)
{
type = WindowStateEventType.None;
return false;
}
type = windowStateEventType;
windowStateEventType = WindowStateEventType.None;
wasWindowStyleChanged = false;
return true;
}
#endregion
#region About mouse cursor
/// <summary>
/// Set the mouse pointer position.
/// </summary>
/// <param name="position">Position.</param>
public static void SetCursorPosition(Vector2 position)
{
LibUniWinC.SetCursorPosition(position.x, position.y);
}
/// <summary>
/// Get the mouse pointer position.
/// </summary>
/// <returns>The position.</returns>
public static Vector2 GetCursorPosition()
{
Vector2 pos = Vector2.zero;
LibUniWinC.GetCursorPosition(out pos.x, out pos.y);
return pos;
}
/// <summary>
/// Get pressed mouse buttons.
/// </summary>
/// <returns>Bit flags of pressed buttons</returns>
public static int GetMouseButtons()
{
return LibUniWinC.GetMouseButtons();
}
/// <summary>
/// Get pressed modifier keys.
/// </summary>
/// <returns>Bit flags of pressed keys</returns>
public static int GetModifierKeys()
{
return LibUniWinC.GetModifierKeys();
}
// Not implemented
public static bool GetCursorVisible()
{
return true;
}
#endregion
#region for Windows only
/// <summary>
/// 透過方法を指定(Windowsのみ対応)
/// </summary>
/// <param name="type"></param>
public void SetTransparentType(TransparentType type)
{
LibUniWinC.SetTransparentType((Int32)type);
transparentType = type;
}
/// <summary>
/// 単色透過の場合の透明色を指定(Windowsのみ対応)
/// </summary>
/// <param name="color"></param>
public void SetKeyColor(Color32 color)
{
LibUniWinC.SetKeyColor((UInt32)(color.b * 0x10000 + color.g * 0x100 + color.r));
keyColor = color;
}
#endregion
#region for macOS only
/// <summary>
/// ウィンドウの自由配置を設定/解除(macOSのみ対応)
/// </summary>
/// <param name="enabled"></param>
public void EnableFreePositioning(bool enabled)
{
LibUniWinC.EnableFreePositioning(enabled);
_isFreePositioningEnabled = LibUniWinC.IsFreePositioningEnabled();
}
#endregion
#region About monitors
/// <summary>
/// Get the monitor index where the window is located
/// </summary>
/// <returns>Monitor index</returns>
public int GetCurrentMonitor()
{
return LibUniWinC.GetCurrentMonitor();
}
/// <summary>
/// Get the number of connected monitors
/// </summary>
/// <returns>Count</returns>
public static int GetMonitorCount()
{
return LibUniWinC.GetMonitorCount();
}
/// <summary>
/// Get monitor position and size
/// </summary>
/// <param name="index"></param>
/// <param name="position"></param>
/// <param name="size"></param>
/// <returns></returns>
public static bool GetMonitorRectangle(int index, out Vector2 position, out Vector2 size)
{
return LibUniWinC.GetMonitorRectangle(index, out position.x, out position.y, out size.x, out size.y);
}
/// <summary>
/// Fit the window to specified monitor
/// </summary>
/// <param name="monitorIndex"></param>
/// <returns></returns>
public bool FitToMonitor(int monitorIndex)
{
float dx, dy, dw, dh;
if (LibUniWinC.GetMonitorRectangle(monitorIndex, out dx, out dy, out dw, out dh))
{
// 最大化状態なら一度戻す
if (LibUniWinC.IsMaximized()) LibUniWinC.SetMaximized(false);
// 指定モニタ中央座標
float cx = dx + (dw / 2);
float cy = dy + (dh / 2);
// ウィンドウ中央を指定モニタ中央に移動
float ww, wh;
LibUniWinC.GetSize(out ww, out wh);
float wx = cx - (ww / 2);
float wy = cy - (wh / 2);
LibUniWinC.SetPosition(wx, wy);
// 最大化
LibUniWinC.SetMaximized(true);
//Debug.Log(String.Format("Monitor {4} : {0},{1} - {2},{3}", dx, dy, dw, dh, monitorIndex));
return true;
}
return false;
}
/// <summary>
/// Print monitor list
/// </summary>
[Obsolete]
public static void DebugMonitorInfo()
{
int monitors = LibUniWinC.GetMonitorCount();
int currentMonitorIndex = LibUniWinC.GetCurrentMonitor();
string message = "Current monitor: " + currentMonitorIndex + "\r\n";
for (int i = 0; i < monitors; i++)
{
float x, y, w, h;
bool result = LibUniWinC.GetMonitorRectangle(i, out x, out y, out w, out h);
message += String.Format(
"Monitor {0}: X:{1}, Y:{2} - W:{3}, H:{4}\r\n",
i, x, y, w, h
);
}
Debug.Log(message);
}
/// <summary>
/// Receive information for debugging
/// </summary>
/// <returns></returns>
[Obsolete]
public static int GetDebugInfo()
{
return LibUniWinC.GetDebugInfo();
}
#endregion
}
}
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/LowLevel/UniWinCore.cs.meta
================================================
fileFormatVersion: 2
guid: 5990f0f19dd4343d09391aa4b153be76
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/LowLevel.meta
================================================
fileFormatVersion: 2
guid: b632a42ce16994953841ea9d9301ce0d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowController.cs
================================================
/*
* UniWindowController.cs
*
* Author: Kirurobo http://twitter.com/kirurobo
* License: MIT
*/
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
#if UNITY_EDITOR
using UnityEditor;
using System.Reflection;
using UnityEngine.Events;
using System.Linq;
#endif
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem;
#endif
namespace Kirurobo
{
/// @cond DOXYGEN_SHOW_INTERNAL_CLASSES
/// <summary>
/// Set editable a bool property
/// </summary>
[System.AttributeUsage(System.AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class EditablePropertyAttribute : UnityEngine.PropertyAttribute { }
/// <summary>
/// Set an attribute as readonly
/// </summary>
[System.AttributeUsage(System.AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class ReadOnlyAttribute : UnityEngine.PropertyAttribute { }
/// @endcond
/// <summary>
/// Unified window controller for Windows / Mac
/// </summary>
public class UniWindowController : MonoBehaviour
{
/// <summary>
/// The same as UniWinCore.TransparentType
/// </summary>
public enum TransparentType : int
{
None = 0,
Alpha = 1,
ColorKey = 2,
}
/// <summary>
/// Scecifies method to hit-test (i.e., switching click-through)
/// </summary>
public enum HitTestType : int
{
None = 0,
Opacity = 1,
Raycast = 2,
}
/// <summary>
/// Identifies the type of <see cref="OnStateChanged">OnStateChanged</see> event when it occurs
/// </summary>
[Flags]
public enum WindowStateEventType : int
{
None = 0,
StyleChanged = 1,
Resized = 2,
// 以降は仕様変更もありえる
TopMostEnabled = 16 + 1 + 8,
TopMostDisabled = 16 + 1,
BottomMostEnabled = 32 + 1 + 8,
BottomMostDisabled = 32 + 1,
WallpaperModeEnabled = 64 + 1 + 8,
WallpaperModeDisabled = 64 + 1,
};
/// <summary>
/// Mouse buttons
/// </summary>
[Flags]
public enum MouseButton : int
{
None = 0,
Left = 1,
Right = 2,
Middle = 4,
}
/// <summary>
/// Modifier keys
/// </summary>
[Flags]
public enum ModifierKey : int
{
None = 0,
Alt = 1,
Control = 2,
Shift = 4,
Command = 8,
}
/// <summary>
/// Get the current instance of UniWindowController
/// </summary>
public static UniWindowController current => _current ? _current : FindOrCreateInstance();
private static UniWindowController _current;
/// <summary>
/// Low level class
/// </summary>
private UniWinCore _uniWinCore = null;
/// <summary>
/// Is this window receives mouse events
/// </summary>
public bool isClickThrough
{
get { return _isClickThrough; }
set { SetClickThrough(value); }
}
private bool _isClickThrough = false;
/// <summary>
/// Is this window transparent
/// </summary>
public bool isTransparent
{
get { return _isTransparent; }
set { SetTransparent(value); }
}
[SerializeField, EditableProperty, Tooltip("Check to set transparent on startup")]
private bool _isTransparent = false;
/// <summary>
/// Window alpha (0.0 to 1.0)
/// </summary>
public float alphaValue
{
get { return _alphaValue; }
set { SetAlphaValue(value); }
}
[SerializeField, EditableProperty, Tooltip("Window alpha"), Range(0f, 1f)]
private float _alphaValue = 1.0f;
/// <summary>
/// Is this window topmost
/// </summary>
public bool isTopmost
{
get { return ((_uniWinCore == null) ? _isTopmost : _isTopmost = _uniWinCore.IsTopmost); }
set { SetTopmost(value); }
}
[SerializeField, EditableProperty, Tooltip("Check to set topmost on startup")]
private bool _isTopmost = false;
/// <summary>
/// Is this window bottommost
/// </summary>
public bool isBottommost
{
get { return ((_uniWinCore == null) ? _isBottommost : _isBottommost = _uniWinCore.IsBottommost); }
set { SetBottommost(value); }
}
[SerializeField, EditableProperty, Tooltip("Check to set bottommost on startup")]
private bool _isBottommost = false;
/// <summary>
/// Is this window minimized
/// </summary>
public bool isZoomed
{
get { return ((_uniWinCore == null) ? _isZoomed : _isZoomed = _uniWinCore.GetZoomed()); }
set { SetZoomed(value); }
}
[SerializeField, EditableProperty, Tooltip("Check to set zoomed on startup")]
private bool _isZoomed = false;
/// <summary>
/// This window will fit to the monitor or not
/// </summary>
public bool shouldFitMonitor
{
get { return _shouldFitMonitor; }
set { FitToMonitor(value, _monitorToFit); }
}
[SerializeField, EditableProperty, Tooltip("Check to fit the window to the monitor")]
private bool _shouldFitMonitor = false;
/// <summary>
/// Target monitor index to fit the window (0, 1, ...)
/// </summary>
public int monitorToFit
{
get { return _monitorToFit; }
set { FitToMonitor(_shouldFitMonitor, value); }
}
private int _monitorToFit = 0;
/// <summary>
/// Enable / disable accepting file drop
/// </summary>
public bool allowDropFiles
{
get { return _allowDropFiles; }
set { SetAllowDrop(value); }
}
[SerializeField, EditableProperty, Tooltip("Enable file or folder dropping")]
private bool _allowDropFiles = false;
/// <summary>
/// クリックスルー自動判定を行うか
/// 行なわない場合は isClickThrough を自分で変更可
/// </summary>
public bool isHitTestEnabled = true;
/// <summary>
/// クリックスルー自動判定の方法
/// </summary>
[Tooltip("Select the method")]
public HitTestType hitTestType = HitTestType.Opacity;
/// <summary>
/// クリックスルー判定方法が不透明度の場合に使うしきい値
/// カーソル下のアルファがこの値以上ならヒットとなる
/// </summary>
[Tooltip("Available on the hit test type is Opacity"), RangeAttribute(0f, 1f)]
public float opacityThreshold = 0.1f;
/// <summary>
/// クリックスルー判定方法が raycast の場合の最遠値
/// </summary>
private float raycastMaxDepth = 100.0f;
/// <summary>
/// trueにしておくと、ウィンドウ透過時にカメラ背景を単色の黒透明に自動で変更します
/// </summary>
[Header("Advanced settings")]
[Tooltip("Change camera background when the window is transparent")]
public bool autoSwitchCameraBackground = true;
/// <summary>
/// trueにしておくと、起動時にフルスクリーンだった場合は強制的に解除します
///
/// 起動時のダイアログでフルスクリーンにしてしまった場合でもウィンドウモードにするためのものです
/// 起動時のみ働きます
/// Macの場合、フルスクリーン状態を強制解除しても別画面になったままであまり有効ではなさそうです
/// </summary>
[Tooltip("Force windowed on startup")]
public bool forceWindowed = false;
/// <summary>
/// カメラのインスタンス
/// </summary>
[Tooltip("Main camera is used if None")]
public Camera currentCamera;
/// <summary>
/// 透過方式の指定
/// </summary>
[Header("For Windows only")]
[Tooltip("Select the method. *Only available on Windows")]
public TransparentType transparentType = TransparentType.Alpha;
/// <summary>
/// Key color used when the transparent-type is ColorKey
/// </summary>
[Tooltip("Will be used the next time the window becomes transparent")]
public Color32 keyColor = new Color32(0x01, 0x00, 0x01, 0x00);
/// <summary>
/// macOSで、メニューバーより上にウィンドウを配置できるようにするか
/// </summary>
public bool isFreePositioningEnabled
{
get { return ((_uniWinCore == null) ? _isFreePositioningEnabled : _isFreePositioningEnabled = _uniWinCore.IsFreePositioningEnabled); }
set { SetFreePositioning(value); }
}
[Header("For macOS only")]
[Tooltip("Disable constrainFrameRect() *Only available on macOS")]
[SerializeField, EditableProperty]
private bool _isFreePositioningEnabled = false;
/// <summary>
/// Is the mouse pointer on an opaque pixel or an object
/// </summary>
[Header("State")]
[SerializeField, ReadOnly, Tooltip("Is the mouse pointer on an opaque pixel? (Read only)")]
private bool onObject = true;
/// <summary>
/// Pixel color under the mouse pointer. (Read only)
/// </summary>
[SerializeField, ReadOnly, Tooltip("Pixel color under the mouse pointer. (Read only)")]
public Color pickedColor;
/// <summary>
/// ウィンドウ座標を取得・設定
/// </summary>
public Vector2 windowPosition
{
get { return (_uniWinCore != null ? _uniWinCore.GetWindowPosition() : Vector2.zero); }
set { _uniWinCore?.SetWindowPosition(value); }
}
/// <summary>
/// ウィンドウ座標を取得・設定
/// </summary>
public Vector2 windowSize
{
get { return (_uniWinCore != null ? _uniWinCore.GetWindowSize() : Vector2.zero); }
set { _uniWinCore?.SetWindowSize(value); }
}
/// <summary>
/// クライアント領域のサイズを取得
/// </summary>
public Vector2 clientSize
{
get { return (_uniWinCore != null ? _uniWinCore.GetClientSize() : Vector2.zero); }
}
/// <summary>
/// マウスカーソル座標を取得・設定
/// </summary>
public Vector2 cursorPosition
{
get { return UniWinCore.GetCursorPosition(); }
set { UniWinCore.SetCursorPosition(value); }
}
/// <summary>
/// 初期状態でのウィンドウ位置、サイズ
/// </summary>
private Rect originalWindowRectangle;
// カメラの背景をアルファゼロの黒に置き換えるため、本来の背景を保存しておく変数
private CameraClearFlags originalCameraClearFlags;
private Color originalCameraBackground;
/// <summary>
/// カーソル下1px分の色が入るテクスチャ
/// </summary>
private Texture2D colorPickerTexture = null;
/// <summary>
/// Raycastで使うマウスイベント情報
/// </summary>
private PointerEventData pointerEventData;
/// <summary>
/// Raycast 時のレイヤーマスク
/// </summary>
private int hitTestLayerMask;
/// <summary>
/// Occurs when the window style changed
/// </summary>
public event OnStateChangedDelegate OnStateChanged;
public delegate void OnStateChangedDelegate(WindowStateEventType type);
public delegate void FilesDelegate(string[] files);
/// <summary>
/// Occurs after files or folders were dropped
/// </summary>
public event FilesDelegate OnDropFiles;
/// <summary>
/// Occurs when the monitor settings or resolution changed
/// </summary>
public event OnMonitorChangedDelegate OnMonitorChanged;
public delegate void OnMonitorChangedDelegate();
// Use this for initialization
void Awake()
{
// シングルトンとする。既にインスタンスがあれば自分を破棄
if (this != current)
{
Destroy(this.gameObject);
return;
}
else
{
_current = this;
}
// フルスクリーン強制解除。エディタでは何もしない
#if !UNITY_EDITOR
if (forceWindowed && Screen.fullScreen)
{
Screen.fullScreen = false;
}
#endif
if (!currentCamera)
{
// メインカメラを探す
currentCamera = Camera.main;
//// もしメインカメラが見つからなければ、Findで探す
//if (!currentCamera)
//{
// currentCamera = GameObject.FindAnyObjectByType<Camera>();
//}
}
// カメラの元の背景を記憶
if (currentCamera)
{
originalCameraClearFlags = currentCamera.clearFlags;
originalCameraBackground = currentCamera.backgroundColor;
}
// マウスイベント情報
pointerEventData = new PointerEventData(EventSystem.current);
// Ignore Raycast 以外を有効とするマスク
hitTestLayerMask = ~LayerMask.GetMask("Ignore Raycast");
// マウス下描画色抽出用テクスチャを準備
colorPickerTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
// ウィンドウ制御用のインスタンス作成
_uniWinCore = new UniWinCore();
}
/// <summary>
/// Fit to specified monitor
/// </summary>
private void UpdateMonitorFitting()
{
if (!_shouldFitMonitor) return;
int monitors = UniWinCore.GetMonitorCount();
int targetMonitorIndex = _monitorToFit;
if (targetMonitorIndex < 0)
{
targetMonitorIndex = 0;
}
if (monitors <= targetMonitorIndex)
{
targetMonitorIndex = monitors - 1;
}
if (targetMonitorIndex >= 0)
{
_uniWinCore.FitToMonitor(targetMonitorIndex);
}
}
/// <summary>
/// Find existing instance or create new instance
/// </summary>
/// <returns></returns>
private static UniWindowController FindOrCreateInstance()
{
var instance = GameObject.FindAnyObjectByType<UniWindowController>();
// 勝手に生成するのは今のところ無効としてみる
// // シーンに見つからなければ新規作成
// if (!instance)
// {
// var obj = new GameObject(nameof(UniWindowController));
// obj.AddComponent<UniWindowController>();
// }
return instance;
}
void Start()
{
//// New Input System で支障があったため検証用に出力
// #if ENABLE_LEGACY_INPUT_MANAGER
// Debug.Log("Use legacy input manager.");
// #elif ENABLE_INPUT_SYSTEM
// Debug.Log("Use new input system.");
// Debug.Log("Run In Background " + Mouse.current.canRunInBackground);
// #else
// Debug.Log("Mouse position is not available.");
// #endif
// マウスカーソル直下の色を取得するコルーチンを開始
StartCoroutine(HitTestCoroutine());
// Get the initial window size and position
StoreOriginalWindowRectangle();
// Fit to the selected monitor
OnMonitorChanged += UpdateMonitorFitting;
UpdateMonitorFitting();
}
void OnDestroy()
{
if (_uniWinCore != null)
{
_uniWinCore.Dispose();
}
// Instance も破棄
if (this == current)
{
_current = null;
}
}
void StoreOriginalWindowRectangle()
{
if (_uniWinCore != null)
{
var size = _uniWinCore.GetWindowSize();
var pos = _uniWinCore.GetWindowPosition();
originalWindowRectangle = new Rect(pos, size);
}
}
// Update is called once per frame
void Update()
{
// 自ウィンドウ取得ができていなければ、取得
if (_uniWinCore == null || !_uniWinCore.IsActive)
{
UpdateTargetWindow();
} else
{
_uniWinCore.Update();
}
// Process events
UpdateEvents();
// キー、マウス操作の下ウィンドウへの透過状態を更新
UpdateClickThrough();
}
/// <summary>
/// Check and process UniWinCore events
/// </summary>
private void UpdateEvents()
{
if (_uniWinCore == null) return;
if (_uniWinCore.ObserveDroppedFiles(out var droppedFiles))
{
OnDropFiles?.Invoke(droppedFiles);
}
if (_uniWinCore.ObserveMonitorChanged())
{
OnMonitorChanged?.Invoke();
}
if (_uniWinCore.ObserveWindowStyleChanged(out var type))
{
// // モニタへのフィット指定がある状態で最大化解除された場合
// if (shouldFitMonitor && !uniWinCore.GetZoomed())
// {
// //StartCoroutine("ForceZoomed"); // 時間差で最大化を強制
// //SetZoomed(true); // 強制的に最大化 ←必ずしも働かない
// //shouldFitMonitor = false; // フィットを無効化
// }
if (_shouldFitMonitor) StartCoroutine("ForceZoomed"); // 時間差で最大化を強制
OnStateChanged?.Invoke((WindowStateEventType)type);
}
}
IEnumerator ForceZoomed()
{
yield return new WaitForSeconds(0.5f);
if (_shouldFitMonitor && !_uniWinCore.GetZoomed()) SetZoomed(true);
yield return null;
}
/// <summary>
/// カメラを指定。以前のカメラがあれば背景を戻す
/// </summary>
/// <param name="newCamera"></param>
public void SetCamera(Camera newCamera)
{
// カメラが変更された場合、設定を戻す
if (newCamera != currentCamera)
{
SetCameraBackground(false);
}
currentCamera = newCamera;
// カメラの元の背景を記憶
if (currentCamera)
{
originalCameraClearFlags = currentCamera.clearFlags;
originalCameraBackground = currentCamera.backgroundColor;
SetCameraBackground(_isTransparent);
}
}
/// <summary>
/// マウス・タッチ操作を下のウィンドウに透過させる
/// </summary>
/// <param name="isThrough"></param>
void SetClickThrough(bool isThrough)
{
_uniWinCore?.EnableClickThrough(isThrough);
_isClickThrough = isThrough;
}
/// <summary>
/// 画素の色を基に操作受付を切り替える
/// </summary>
void UpdateClickThrough()
{
// 自動ヒットテスト無しならば終了
if (!isHitTestEnabled || hitTestType == HitTestType.None) return;
// マウスカーソル非表示状態ならば透明画素上と同扱い
bool hit = (onObject);
if (_isClickThrough)
{
// ここまでクリックスルー状態だったら、ヒットしたときだけ戻す
if (hit)
{
SetClickThrough(false);
}
}
else
{
// ここまでクリックスルーでなければ、透明かつヒットしなかったときだけクリックスルーとする
if (isTransparent && !hit)
{
SetClickThrough(true);
}
}
}
/// <summary>
/// コルーチンでカーソル下の色、またはRaycastによるヒットテストを繰り返す
/// WaitForEndOfFrame() を使うためにコルーチンとしている
/// </summary>
/// <returns></returns>
private IEnumerator HitTestCoroutine()
{
while (Application.isPlaying)
{
yield return new WaitForEndOfFrame();
// Windowsの場合、単色での透過ならばヒットテストはOSに任せるため、常にヒット
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
if (transparentType == TransparentType.ColorKey)
{
onObject = true;
}
else
#endif
if (hitTestType == HitTestType.Opacity)
{
HitTestByOpaquePixel();
}
else if (hitTestType == HitTestType.Raycast)
{
HitTestByRaycast();
}
else
{
// ヒットテスト無しの場合は常にtrue
onObject = true;
}
}
yield return null;
}
/// <summary>
/// 画面上のマウス座標を Unity のスクリーン座標系に換算して取得
/// </summary>
private Vector2 GetClientCursorPosition()
{
// New Input System ではフォーカスが無い場合にマウス座標が取得できないため独自に計算する
Vector2 mousePos = UniWinCore.GetCursorPosition();
Vector2 winPos = windowPosition;
Rect clientRect = _uniWinCore.GetClientRectangle();
Vector2 unityPos = new Vector2(
(mousePos.x - winPos.x - clientRect.x) * Screen.width / clientRect.width,
(mousePos.y - winPos.y - clientRect.y) * Screen.height / clientRect.height
);
// // デバッグ用
// // Unityで取得した値と比較
// #if ENABLE_LEGACY_INPUT_MANAGER
// Vector2 position = Input.mousePosition;
// #elif ENABLE_INPUT_SYSTEM
// Vector2 position = Mouse.current.position.ReadValue();
// #endif
// if (!position.Equals(unityPos))
// {
// Debug.LogWarning("Mouse position diff : " + position + " / " + unityPos);
// }
// エディターの場合は常にUnityの機能でマウス座標を取得
// Gameウィンドウ単体ではなかったり、Scaleが異なる場合があるため単純計算では求まらない
#if UNITY_EDITOR
#if ENABLE_LEGACY_INPUT_MANAGER
return Input.mousePosition;
#elif UNITY_EDITOR && ENABLE_INPUT_SYSTEM
return Mouse.current.position.ReadValue();
#else
return unityPos;
#endif
#else
return unityPos;
#endif
}
/// <summary>
/// マウス下の画素があるかどうかを確認
/// </summary>
private void HitTestByOpaquePixel()
{
Vector2 mousePos = GetClientCursorPosition();
// マウス座標を調べる
if (GetOnOpaquePixel(mousePos))
{
//Debug.Log("Mouse " + mousePos);
onObject = true;
//activeFingerId = -1; // タッチ追跡は解除
return;
}
else
{
onObject = false;
}
}
/// <summary>
/// 指定座標の画素が透明か否かを返す
/// </summary>
/// <param name="mousePos">座標[px]。必ず描画範囲内であること。</param>
/// <returns></returns>
private bool GetOnOpaquePixel(Vector2 mousePos)
{
float w = Screen.width;
float h = Screen.height;
//Debug.Log(w + ", " + h);
// 画面外であれば透明と同様
if (
mousePos.x < 0 || mousePos.x >= w
|| mousePos.y < 0 || mousePos.y >= h
)
{
return false;
}
// 透過状態でなければ、範囲内なら不透過扱いとする
if (!_isTransparent) return true;
// LayeredWindowならばクリックスルーはOSに任せるため、ウィンドウ内ならtrueを返しておく
if (transparentType == TransparentType.ColorKey) return true;
// 指定座標の描画結果を見て判断
try // WaitForEndOfFrame のタイミングで実行すればtryは無くても大丈夫な気はする
{
// Reference http://tsubakit1.hateblo.jp/entry/20131203/1386000440
colorPickerTexture.ReadPixels(new Rect(mousePos, Vector2.one), 0, 0);
Color color = colorPickerTexture.GetPixels32()[0];
pickedColor = color;
return (color.a >= opacityThreshold); // αがしきい値以上ならば不透過とする
}
catch (System.Exception ex)
{
Debug.LogError(ex.Message);
return false;
}
}
/// <summary>
/// マウス下にオブジェクトがあるかどうかを確認
/// </summary>
private void HitTestByRaycast()
{
Vector2 position = GetClientCursorPosition();
// // uGUIの上か否かを判定
var raycastResults = new List<RaycastResult>();
pointerEventData.position = position;
EventSystem.current.RaycastAll(pointerEventData, raycastResults);
foreach (var result in raycastResults)
{
// レイヤーマスクを考慮(Ignore Raycast 以外ならヒット)
if (((1 << result.gameObject.layer) & hitTestLayerMask) > 0)
{
onObject = true;
return;
}
}
// レイヤーに関わらずヒットさせる場合は下記でよい
// // uGUIの上と判定されれば、終了
// if (EventSystem.current.IsPointerOverGameObject())
// {
// onObject = true;
// return;
// }
if (currentCamera && currentCamera.isActiveAndEnabled)
{
Ray ray = currentCamera.ScreenPointToRay(position);
// 3Dオブジェクトの上か否かを判定
if (Physics.Raycast(ray, out _, raycastMaxDepth))
{
onObject = true;
return;
}
// 2Dオブジェクトの上か判定
var rayHit2D = Physics2D.GetRayIntersection(ray);
Debug.DrawRay(ray.origin, ray.direction, Color.blue, 2f, false);
if (rayHit2D.collider != null)
{
onObject = true;
return;
}
} else
{
// カメラが有効でなければメインカメラを取得
currentCamera = Camera.main;
}
// いずれもヒットしなければオブジェクト上ではないと判断
onObject = false;
}
/// <summary>
/// 自分のウィンドウハンドルが不確かならば探しなおす
/// </summary>
private void UpdateTargetWindow()
{
if (_uniWinCore == null)
{
_uniWinCore = new UniWinCore();
}
// ウィンドウがまだ取得できていなければ、取得の処理を行う
if (!_uniWinCore.IsActive)
{
_uniWinCore.AttachMyWindow();
// ウィンドウを取得できたら最初の値を設定
if (_uniWinCore.IsActive)
{
_uniWinCore.SetTransparentType((UniWinCore.TransparentType)transparentType);
_uniWinCore.SetKeyColor(keyColor);
_uniWinCore.SetAlphaValue(_alphaValue);
SetTransparent(_isTransparent);
if (_isBottommost)
{
SetBottommost(_isBottommost);
}
else
{
SetTopmost(_isTopmost);
}
SetZoomed(_isZoomed);
SetClickThrough(_isClickThrough);
SetAllowDrop(_allowDropFiles);
SetFreePositioning(_isFreePositioningEnabled);
// ウィンドウ取得時にはモニタ変更と同等の処理を行う
OnMonitorChanged?.Invoke();
}
}
else
{
#if UNITY_EDITOR
// エディタではゲームビューが閉じられたりドッキングされたりするため、変化していれば対象ウィンドウを変更
// アクティブウィンドウが現在の対象と同じならばなにもおこらない
_uniWinCore.AttachMyActiveWindow();
#endif
}
}
/// <summary>
/// ウィンドウへのフォーカスが変化したときに呼ばれる
/// </summary>
/// <param name="focus"></param>
private void OnApplicationFocus(bool focus)
{
if (focus)
{
UpdateTargetWindow();
// フォーカスが当たった瞬間には、強制的にクリックスルーはオフにする
if (_isTransparent && isHitTestEnabled && transparentType != TransparentType.ColorKey)
{
SetClickThrough(false);
}
}
}
/// <summary>
/// ウィンドウ透過状態になった際、自動的に背景を透明単色に変更する
/// </summary>
/// <param name="transparent"></param>
void SetCameraBackground(bool transparent)
{
// カメラが特定できていないか、自動切替をしない場合は、何もしない
if (!currentCamera || !autoSwitchCameraBackground) return;
// 透過するならカメラの背景を透明色に変更
if (transparent)
{
// 透明化される前ならば、現時点のカメラ情報を記憶
if (!isTransparent)
{
originalCameraClearFlags = currentCamera.clearFlags;
originalCameraBackground = currentCamera.backgroundColor;
}
currentCamera.clearFlags = CameraClearFlags.SolidColor;
if (transparentType == TransparentType.ColorKey)
{
currentCamera.backgroundColor = keyColor;
}
else
{
currentCamera.backgroundColor = Color.clear;
}
}
else
{
currentCamera.clearFlags = originalCameraClearFlags;
currentCamera.backgroundColor = originalCameraBackground;
}
}
/// <summary>
/// 透明化状態を切替
/// </summary>
/// <param name="transparent"></param>
private void SetTransparent(bool transparent)
{
SetCameraBackground(transparent);
_isTransparent = transparent;
#if !UNITY_EDITOR
if (_uniWinCore != null)
{
_uniWinCore.EnableTransparent(transparent);
}
#endif
UpdateClickThrough();
}
/// <summary>
/// 透過方法を変更
/// </summary>
/// <param name="type"></param>
public void SetTransparentType(TransparentType type)
{
if (_uniWinCore != null) {
// 透過中だったなら、一度解除して再透過
if (_isTransparent)
{
SetTransparent(false);
_uniWinCore.SetTransparentType((UniWinCore.TransparentType)type);
transparentType = type;
SetTransparent(true);
}
else
{
_uniWinCore.SetTransparentType((UniWinCore.TransparentType)type);
transparentType = type;
}
}
}
/// <summary>
/// Set window alpha
/// </summary>
/// <param name="alpha">0.0 to 1.0</param>
private void SetAlphaValue(float alpha)
{
_alphaValue = alpha;
_uniWinCore?.SetAlphaValue(_alphaValue);
}
/// <summary>
/// 最前面を切替
/// </summary>
/// <param name="topmost"></param>
private void SetTopmost(bool topmost)
{
//if (_isTopmost == topmost) return;
if (_uniWinCore == null) return;
_uniWinCore.EnableTopmost(topmost);
_isTopmost = _uniWinCore.IsTopmost;
_isBottommost = _uniWinCore.IsBottommost;
}
/// <summary>
/// 常に最背面を切替
/// </summary>
/// <param name="bottommost"></param>
private void SetBottommost(bool bottommost)
{
if (_uniWinCore == null) return;
_uniWinCore.EnableBottommost(bottommost);
_isBottommost = _uniWinCore.IsBottommost;
_isTopmost = _uniWinCore.IsTopmost;
}
/// <summary>
/// 最大化する
/// </summary>
/// <param name="zoomed"></param>
private void SetZoomed(bool zoomed)
{
if (_uniWinCore == null) return;
_uniWinCore.SetZoomed(zoomed);
_isZoomed = _uniWinCore.GetZoomed();
}
private void SetAllowDrop(bool enabled)
{
if (_uniWinCore == null) return;
_uniWinCore.SetAllowDrop(enabled);
_allowDropFiles = enabled;
}
/// <summary>
/// macOSで、メニューバーより上を含む自由な位置ウィンドウを配置できるようにする
/// </summary>
/// <param name="enabled"></param>
private void SetFreePositioning(bool enabled)
{
if (_uniWinCore == null) return;
_uniWinCore.EnableFreePositioning(enabled);
_isFreePositioningEnabled = _uniWinCore.IsFreePositioningEnabled;
}
/// <summary>
/// Get the number of connected monitors
/// </summary>
/// <returns></returns>
public static int GetMonitorCount()
{
//if (uniWinCore == null) return 0;
return UniWinCore.GetMonitorCount();
}
/// <summary>
/// Get monitor position and size
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
public static Rect GetMonitorRect(int index)
{
if (UniWinCore.GetMonitorRectangle(index, out Vector2 position, out Vector2 size))
{
return new Rect(position, size);
}
return Rect.zero;
}
/// <summary>
/// Fit to the specified monitor
/// </summary>
/// <returns></returns>
private bool FitToMonitor(bool shouldFit, int monitorIndex)
{
if (_uniWinCore == null)
{
_shouldFitMonitor = shouldFit;
_monitorToFit = monitorIndex;
return false;
}
if (shouldFit)
{
if (!_shouldFitMonitor)
{
// 直前はフィットしない状態だった場合
_monitorToFit = monitorIndex;
_shouldFitMonitor = shouldFit;
UpdateMonitorFitting();
}
else
{
if (_monitorToFit != monitorIndex)
{
// フィット先モニタが変化した場合
_monitorToFit = monitorIndex;
UpdateMonitorFitting();
}
}
}
else
{
if (_shouldFitMonitor)
{
// 直前はフィット状態で、解除された場合
_monitorToFit = monitorIndex;
_shouldFitMonitor = shouldFit;
UpdateMonitorFitting();
_uniWinCore.SetZoomed(false);
//uniWinCore.SetWindowSize(originalWindowRectangle.size);
//uniWinCore.SetWindowPosition(originalWindowRectangle.position);
}
else
{
// フィット中でなければ選択を変えるのみ
_monitorToFit = monitorIndex;
}
}
return true;
}
/// <summary>
/// Get mouse cursor position
/// </summary>
/// <returns>Cursor position</returns>
public static Vector2 GetCursorPosition()
{
return UniWinCore.GetCursorPosition();
}
/// <summary>
/// Set mouse cursor position
/// </summary>
/// <param name="position"></param>
public static void SetCursorPosition(Vector2 position)
{
UniWinCore.SetCursorPosition(position);
}
/// <summary>
/// Get mouse buttons
/// </summary>
/// <returns></returns>
public static MouseButton GetMouseButtons()
{
int buttons = UniWinCore.GetMouseButtons();
return (MouseButton)buttons;
}
/// <summary>
/// Get pressed modifier keys
/// </summary>
/// <returns></returns>
public static ModifierKey GetModifierKeys()
{
int mod = UniWinCore.GetModifierKeys();
return (ModifierKey)mod;
}
/// <summary>
/// 終了時にはウィンドウ状態を戻す処理が必要
/// </summary>
void OnApplicationQuit()
{
if (Application.isPlaying)
{
if (_uniWinCore != null)
{
// エディタだとウィンドウ状態を戻す
// スタンドアローンだと戻した姿が見えてしまうためスキップ
#if UNITY_EDITOR
_uniWinCore.SetWindowSize(originalWindowRectangle.size);
_uniWinCore.SetWindowPosition(originalWindowRectangle.position);
_uniWinCore.DetachWindow();
#endif
_uniWinCore.Dispose();
}
}
}
/// <summary>
/// 自分のウィンドウにフォーカスを与える
/// </summary>
public void Focus()
{
if (_uniWinCore != null)
{
//uniWin.SetFocus();
}
}
/// <summary>
/// デバッグ専用。その都度参考となる情報を受けるための関数
/// </summary>
/// <returns></returns>
[Obsolete]
public int GetDebugInfo()
{
if (_uniWinCore != null) {
return UniWinCore.GetDebugInfo();
}
return 0;
}
}
}
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowController.cs.meta
================================================
fileFormatVersion: 2
guid: eb951500192d2430eb3e306480cc2f31
timeCreated: 1545989238
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowMoveHandle.cs
================================================
/*
* UniWindowDragMove.cs
*
* Author: Kirurobo http://twitter.com/kirurobo
* License: MIT
*/
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEngine.EventSystems;
#if ENABLE_LEGACY_INPUT_MANAGER
#elif ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem;
#endif
namespace Kirurobo
{
public class UniWindowMoveHandle : MonoBehaviour, IDragHandler, IBeginDragHandler, IEndDragHandler, IPointerUpHandler
{
private UniWindowController _uniwinc;
/// <summary>
/// ウィンドウが最大化されているときは移動を無効にするか
/// </summary>
[Tooltip("Disable drag-move when the window is zoomed (maximized).")]
public bool disableOnZoomed = true;
/// <summary>
/// ドラッグ中なら true
/// </summary>
public bool IsDragging
{
get { return _isDragging; }
}
private bool _isDragging = false;
/// <summary>
/// ドラッグを行なうか否か
/// </summary>
private bool IsEnabled
{
get { return enabled && (!disableOnZoomed || !IsZoomed); }
}
/// <summary>
/// モニタにフィットさせるか、最大化している
/// </summary>
private bool IsZoomed
{
get { return (_uniwinc && (_uniwinc.shouldFitMonitor || _uniwinc.isZoomed)); }
}
/// <summary>
/// ドラッグ前には自動ヒットテストが有効だったかを記憶
/// </summary>
private bool _isHitTestEnabled;
/// <summary>
/// ドラッグ開始時のウィンドウ内座標[px]
/// </summary>
private Vector2 _dragStartedPosition;
// Start is called before the first frame update
void Start()
{
// シーン中の UniWindowController を取得
_uniwinc = GameObject.FindAnyObjectByType<UniWindowController>();
if (_uniwinc) _isHitTestEnabled = _uniwinc.isHitTestEnabled;
//// ↓なくても良さそうなので勝手に変更しないようコメントアウト
//Input.simulateMouseWithTouches = false;
}
/// <summary>
/// ドラッグ開始時の処理
/// </summary>
public void OnBeginDrag(PointerEventData eventData)
{
if (!IsEnabled)
{
return;
}
// マウス左ボタンでのみドラッグ
if (eventData.button != PointerEventData.InputButton.Left) return;
// Macだと挙動を変える
// 実際はRetinaサポートが有効のときだけだが、
// eventData.position の系と、ウィンドウ座標系でスケールが一致しなくなってしまう
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
_dragStartedPosition = _uniwinc.windowPosition - _uniwinc.cursorPosition;
#else
_dragStartedPosition = eventData.position;
#endif
// _isDragging が false ならこれからドラッグ開始と判断
if (!_isDragging)
{
// ドラッグ中はヒットテストを無効にする
_isHitTestEnabled = _uniwinc.isHitTestEnabled;
_uniwinc.isHitTestEnabled = false;
_uniwinc.isClickThrough = false;
}
_isDragging = true;
}
/// <summary>
/// ドラッグ終了時の処理
/// </summary>
public void OnEndDrag(PointerEventData eventData)
{
EndDragging();
}
/// <summary>
/// マウスが上がった際もドラッグ終了とみなす
/// </summary>
/// <param name="eventData"></param>
public void OnPointerUp(PointerEventData eventData)
{
EndDragging();
}
/// <summary>
/// ドラッグ終了とする
/// </summary>
private void EndDragging()
{
if (_isDragging)
{
_uniwinc.isHitTestEnabled = _isHitTestEnabled;
}
_isDragging = false;
}
/// <summary>
/// 最大化時以外なら、マウスドラッグによってウィンドウを移動
/// </summary>
public void OnDrag(PointerEventData eventData)
{
if (!_uniwinc || !_isDragging) return;
// ドラッグでの移動が無効化されていた場合はドラッグ終了
if (!IsEnabled)
{
EndDragging();
return;
}
// // マウス左ボタンが押されていなければドラッグ終了
// if (eventData.button != PointerEventData.InputButton.Left) return;
// [Shift]、[Ctrl]、[Alt]、[Command] キーが押されている間はドラッグとして扱わない
var modifiers = UniWindowController.GetModifierKeys();
if (modifiers != UniWindowController.ModifierKey.None) return;
// マウスボタンが離されていればドラッグ終了
var buttons = UniWindowController.GetMouseButtons();
if ((buttons & UniWindowController.MouseButton.Left) == UniWindowController.MouseButton.None) {
EndDragging();
return;
}
// #if ENABLE_LEGACY_INPUT_MANAGER
// // Macの場合、マルチモニター間を移動するとEventSystemのOnEndDragが正しく呼ばれないため、マウスボタンを常に監視
// if (!Input.Mouse.Button(0).IsPressed) {
// EndDragging();
// return;
// }
// if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift)
// || Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)
// || Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) return;
// #elif ENABLE_INPUT_SYSTEM
// // Macの場合、マルチモニター間を移動するとEventSystemのOnEndDragが正しく呼ばれないため、マウスボタンを常に監視
// if (!Mouse.current.leftButton.isPressed) {
// EndDragging();
// return;
// }
// if (Keyboard.current[Key.LeftShift].isPressed || Keyboard.current[Key.RightShift].isPressed
// || Keyboard.current[Key.LeftCtrl].isPressed || Keyboard.current[Key.RightCtrl].isPressed
// || Keyboard.current[Key.LeftAlt].isPressed || Keyboard.current[Key.RightAlt].isPressed) return;
// #endif
// フルスクリーンならウィンドウ移動は行わない
// エディタだと true になってしまうようなので、エディタ以外でのみ確認
#if !UNITY_EDITOR
if (Screen.fullScreen)
{
EndDragging();
return;
}
#endif
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
// Macの場合、ネイティブプラグインでのカーソル位置取得・設定
_uniwinc.windowPosition = _uniwinc.cursorPosition + _dragStartedPosition;
//Debug.Log("Drag start: " + _dragStartedPosition);
#else
// Windowsなら、タッチ操作も対応させるために eventData.position を使用する
// スクリーンポジションが開始時の位置と一致させる分だけウィンドウを移動
_uniwinc.windowPosition += eventData.position - _dragStartedPosition;
#endif
}
}
}
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowMoveHandle.cs.meta
================================================
fileFormatVersion: 2
guid: e7879148f4ed9cc42aa2ef8f22bf92c0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts.meta
================================================
fileFormatVersion: 2
guid: a28eccdfd160f4047a67697fd467aaf5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime.meta
================================================
fileFormatVersion: 2
guid: 008c9523bda467543b8bfc78c255fccc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Samples/00_Menu/SampleManager.cs
================================================
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UIElements;
namespace Kirurobo
{
public class SampleManager : MonoBehaviour
{
private static SampleManager _instance;
public static SampleManager Instance => _instance ?? (_instance = GameObject.FindAnyObjectByType<SampleManager>() ?? new SampleManager());
public Canvas canvas;
private void Awake()
{
// シングルトンとする。既にインスタンスがあれば自分を破棄
if (this != Instance)
{
Destroy(this.gameObject);
return;
}
DontDestroyOnLoad(Instance);
DontDestroyOnLoad(UniWindowController.current);
SceneManager.sceneLoaded += SceneManager_sceneLoaded;
}
/// <summary>
/// シーンロード時にメインカメラを記憶
/// </summary>
/// <param name="arg0"></param>
/// <param name="arg1"></param>
private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1)
{
UniWindowController.current.SetCamera(Camera.main);
}
/// <summary>
/// 指定の名前のシーンを開く
/// </summary>
/// <param name="name">シーン名</param>
public void LoadScene(string name)
{
if (name == "SimpleSample")
{
// SimpleSample の場合はスクリプトでの制御がないため、ここで透明化
UniWindowController.current.isTransparent = true;
}
else if (name == "FullScreenSample")
{
// FullScreenSample の場合は強制的に最大化
UniWindowController.current.shouldFitMonitor = true;
}
SceneManager.LoadScene(name);
}
/// <summary>
/// 終了
/// </summary>
public void Quit()
{
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
#else
Application.Quit();
#endif
}
}
}
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Samples/00_Menu/SampleManager.cs.meta
================================================
fileFormatVersion: 2
guid: c83c7f09afe53854b909aed0ea55a3cd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Samples/00_Menu/SampleMenu.unity
================================================
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641186, b: 0.57481647, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 500
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 2
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 4890085278179872738, guid: 970bccad986844364a272b0245fed77e,
type: 2}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 3
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
buildHeightMesh: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &52431802
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 52431803}
- component: {fileID: 52431805}
- component: {fileID: 52431804}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &52431803
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 52431802}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 726204352}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &52431804
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 52431802}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: QUIT
--- !u!222 &52431805
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 52431802}
m_CullTransparentMesh: 1
--- !u!1 &726204351
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 726204352}
- component: {fileID: 726204355}
- component: {fileID: 726204354}
- component: {fileID: 726204353}
m_Layer: 5
m_Name: Button_Quit
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &726204352
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 726204351}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 52431803}
m_Father: {fileID: 4973827624905143188}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 40, y: -150}
m_SizeDelta: {x: 100, y: 30}
m_Pivot: {x: 0, y: 1}
--- !u!114 &726204353
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 726204351}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 726204354}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 4973827625486595095}
m_TargetAssemblyTypeName: Kirurobo.SampleManager, Assembly-CSharp
m_MethodName: Quit
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: FileDialogSample
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &726204354
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 726204351}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &726204355
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 726204351}
m_CullTransparentMesh: 1
--- !u!1 &841290929
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 841290932}
- component: {fileID: 841290931}
- component: {fileID: 841290930}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &841290930
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 841290929}
m_Enabled: 1
--- !u!20 &841290931
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 841290929}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &841290932
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 841290929}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1342301556
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1342301558}
- component: {fileID: 1342301557}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &1342301557
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1342301556}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.802082
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1342301558
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1342301556}
serializedVersion: 2
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1001 &1345228756
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984,
type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2416199871598626842, guid: e893aefd93740714b999573b02916984,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2416199871598626844, guid: e893aefd93740714b999573b02916984,
type: 3}
propertyPath: m_Name
value: UniWindowController
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e893aefd93740714b999573b02916984, type: 3}
--- !u!1 &1538147870
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1538147873}
- component: {fileID: 1538147872}
- component: {fileID: 1538147874}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1538147872
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1538147870}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &1538147873
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1538147870}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1538147874
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1538147870}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fi
gitextract_ik_wzm75/
├── .github/
│ └── workflows/
│ ├── main.yml
│ └── upm.yml
├── .gitignore
├── LICENSE.txt
├── README-ja.md
├── README.md
├── UniWinC/
│ ├── .gitignore
│ ├── .vscode/
│ │ ├── extensions.json
│ │ ├── launch.json
│ │ └── settings.json
│ ├── Assets/
│ │ ├── InputSystem.inputsettings.asset
│ │ ├── InputSystem.inputsettings.asset.meta
│ │ ├── Kirurobo/
│ │ │ ├── UniWindowController/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── CHANGELOG.md
│ │ │ │ ├── CHANGELOG.md.meta
│ │ │ │ ├── Editor/
│ │ │ │ │ ├── Kirurobo.UniWindowController.Editor.asmdef
│ │ │ │ │ ├── Kirurobo.UniWindowController.Editor.asmdef.meta
│ │ │ │ │ ├── Scripts/
│ │ │ │ │ │ ├── UniWindowControllerBatch.cs
│ │ │ │ │ │ ├── UniWindowControllerBatch.cs.meta
│ │ │ │ │ │ ├── UniWindowControllerEditor.cs
│ │ │ │ │ │ └── UniWindowControllerEditor.cs.meta
│ │ │ │ │ └── Scripts.meta
│ │ │ │ ├── Editor.meta
│ │ │ │ ├── LICENSE.md
│ │ │ │ ├── LICENSE.md.meta
│ │ │ │ ├── README-ja.md
│ │ │ │ ├── README-ja.md.meta
│ │ │ │ ├── README.md
│ │ │ │ ├── README.md.meta
│ │ │ │ ├── Runtime/
│ │ │ │ │ ├── Kirurobo.UniWindowController.asmdef
│ │ │ │ │ ├── Kirurobo.UniWindowController.asmdef.meta
│ │ │ │ │ ├── Plugins/
│ │ │ │ │ │ ├── MacOS/
│ │ │ │ │ │ │ ├── LibUniWinC.bundle/
│ │ │ │ │ │ │ │ └── Contents/
│ │ │ │ │ │ │ │ ├── Info.plist
│ │ │ │ │ │ │ │ ├── MacOS/
│ │ │ │ │ │ │ │ │ └── LibUniWinC
│ │ │ │ │ │ │ │ └── _CodeSignature/
│ │ │ │ │ │ │ │ └── CodeResources
│ │ │ │ │ │ │ └── LibUniWinC.bundle.meta
│ │ │ │ │ │ ├── MacOS.meta
│ │ │ │ │ │ ├── Windows/
│ │ │ │ │ │ │ ├── x64/
│ │ │ │ │ │ │ │ └── LibUniWinC.dll.meta
│ │ │ │ │ │ │ ├── x64.meta
│ │ │ │ │ │ │ ├── x86/
│ │ │ │ │ │ │ │ └── LibUniWinC.dll.meta
│ │ │ │ │ │ │ └── x86.meta
│ │ │ │ │ │ └── Windows.meta
│ │ │ │ │ ├── Plugins.meta
│ │ │ │ │ ├── Prefabs/
│ │ │ │ │ │ ├── DragMoveCanvas.prefab
│ │ │ │ │ │ ├── DragMoveCanvas.prefab.meta
│ │ │ │ │ │ ├── UniWindowController.prefab
│ │ │ │ │ │ └── UniWindowController.prefab.meta
│ │ │ │ │ ├── Prefabs.meta
│ │ │ │ │ ├── Scripts/
│ │ │ │ │ │ ├── LowLevel/
│ │ │ │ │ │ │ ├── FilePanel.cs
│ │ │ │ │ │ │ ├── FilePanel.cs.meta
│ │ │ │ │ │ │ ├── UniWinCore.cs
│ │ │ │ │ │ │ └── UniWinCore.cs.meta
│ │ │ │ │ │ ├── LowLevel.meta
│ │ │ │ │ │ ├── UniWindowController.cs
│ │ │ │ │ │ ├── UniWindowController.cs.meta
│ │ │ │ │ │ ├── UniWindowMoveHandle.cs
│ │ │ │ │ │ └── UniWindowMoveHandle.cs.meta
│ │ │ │ │ └── Scripts.meta
│ │ │ │ ├── Runtime.meta
│ │ │ │ ├── Samples/
│ │ │ │ │ ├── 00_Menu/
│ │ │ │ │ │ ├── SampleManager.cs
│ │ │ │ │ │ ├── SampleManager.cs.meta
│ │ │ │ │ │ ├── SampleMenu.unity
│ │ │ │ │ │ ├── SampleMenu.unity.meta
│ │ │ │ │ │ ├── SampleMenuSettings.lighting
│ │ │ │ │ │ └── SampleMenuSettings.lighting.meta
│ │ │ │ │ ├── 00_Menu.meta
│ │ │ │ │ ├── 01_SimpleSample/
│ │ │ │ │ │ ├── SimpleSample.unity
│ │ │ │ │ │ └── SimpleSample.unity.meta
│ │ │ │ │ ├── 01_SimpleSample.meta
│ │ │ │ │ ├── 02_UiSample/
│ │ │ │ │ │ ├── UiSample.unity
│ │ │ │ │ │ ├── UiSample.unity.meta
│ │ │ │ │ │ ├── UiSampleCanvas.prefab
│ │ │ │ │ │ ├── UiSampleCanvas.prefab.meta
│ │ │ │ │ │ ├── UiSampleController.cs
│ │ │ │ │ │ └── UiSampleController.cs.meta
│ │ │ │ │ ├── 02_UiSample.meta
│ │ │ │ │ ├── 03_Fullscreen/
│ │ │ │ │ │ ├── FullscreenSample.cs
│ │ │ │ │ │ ├── FullscreenSample.cs.meta
│ │ │ │ │ │ ├── FullscreenSample.unity
│ │ │ │ │ │ ├── FullscreenSample.unity.meta
│ │ │ │ │ │ ├── FullscreenSampleSettings.lighting
│ │ │ │ │ │ ├── FullscreenSampleSettings.lighting.meta
│ │ │ │ │ │ ├── SnowParticle.mat
│ │ │ │ │ │ ├── SnowParticle.mat.meta
│ │ │ │ │ │ ├── SnowmanArm.mat
│ │ │ │ │ │ ├── SnowmanArm.mat.meta
│ │ │ │ │ │ ├── SnowmanBody.mat
│ │ │ │ │ │ ├── SnowmanBody.mat.meta
│ │ │ │ │ │ ├── SnowmanFace.mat
│ │ │ │ │ │ └── SnowmanFace.mat.meta
│ │ │ │ │ ├── 03_Fullscreen.meta
│ │ │ │ │ ├── 04_FileDialog/
│ │ │ │ │ │ ├── FileDialogSample.cs
│ │ │ │ │ │ ├── FileDialogSample.cs.meta
│ │ │ │ │ │ ├── FileDialogSample.unity
│ │ │ │ │ │ ├── FileDialogSample.unity.meta
│ │ │ │ │ │ ├── FileDialogSampleSettings.lighting
│ │ │ │ │ │ └── FileDialogSampleSettings.lighting.meta
│ │ │ │ │ ├── 04_FileDialog.meta
│ │ │ │ │ ├── Common/
│ │ │ │ │ │ ├── AutoRotator.cs
│ │ │ │ │ │ ├── AutoRotator.cs.meta
│ │ │ │ │ │ ├── CollisionBorder.png.meta
│ │ │ │ │ │ ├── GreenBorder.png.meta
│ │ │ │ │ │ ├── InputModuleProxy.cs
│ │ │ │ │ │ ├── InputModuleProxy.cs.meta
│ │ │ │ │ │ ├── InputProxy.cs
│ │ │ │ │ │ ├── InputProxy.cs.meta
│ │ │ │ │ │ ├── ModelController.cs
│ │ │ │ │ │ ├── ModelController.cs.meta
│ │ │ │ │ │ ├── UiMaterial.mat
│ │ │ │ │ │ └── UiMaterial.mat.meta
│ │ │ │ │ └── Common.meta
│ │ │ │ ├── Samples.meta
│ │ │ │ ├── package.json
│ │ │ │ └── package.json.meta
│ │ │ └── UniWindowController.meta
│ │ └── Kirurobo.meta
│ ├── Packages/
│ │ ├── manifest.json
│ │ └── packages-lock.json
│ └── ProjectSettings/
│ ├── AudioManager.asset
│ ├── ClusterInputManager.asset
│ ├── DynamicsManager.asset
│ ├── EditorBuildSettings.asset
│ ├── EditorSettings.asset
│ ├── GraphicsSettings.asset
│ ├── InputManager.asset
│ ├── MemorySettings.asset
│ ├── NavMeshAreas.asset
│ ├── NetworkManager.asset
│ ├── PackageManagerSettings.asset
│ ├── Physics2DSettings.asset
│ ├── PresetManager.asset
│ ├── ProjectSettings.asset
│ ├── ProjectVersion.txt
│ ├── QualitySettings.asset
│ ├── SceneTemplateSettings.json
│ ├── TagManager.asset
│ ├── TimeManager.asset
│ ├── UnityConnectSettings.asset
│ ├── VFXManager.asset
│ ├── VersionControlSettings.asset
│ └── XRSettings.asset
├── VisualStudio/
│ ├── .gitignore
│ ├── LibUniWinC/
│ │ ├── LibUniWinC.vcxproj
│ │ ├── LibUniWinC.vcxproj.filters
│ │ ├── Resource.rc
│ │ ├── dllmain.cpp
│ │ ├── framework.h
│ │ ├── libuniwinc.cpp
│ │ ├── libuniwinc.h
│ │ ├── pch.cpp
│ │ ├── pch.h
│ │ └── resource.h
│ ├── LibUniWinC.sln
│ └── TestLibUniWinC/
│ ├── Additional/
│ │ ├── WindowInfo.cs
│ │ └── WindowList.cs
│ ├── App.config
│ ├── FormMain.Designer.cs
│ ├── FormMain.cs
│ ├── FormMain.resx
│ ├── LowLevel/
│ │ ├── FilePanel.cs
│ │ └── UniWinCore.cs
│ ├── Program.cs
│ ├── Properties/
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── TestLibUniWinC.csproj
│ └── UnityEmulation/
│ ├── AOT.cs
│ └── UnityEngine.cs
├── Xcode/
│ ├── .gitignore
│ ├── DebugUniWinC/
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets/
│ │ │ ├── AccentColor.colorset/
│ │ │ │ └── Contents.json
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── ContentView.swift
│ │ ├── DebugUniWinC.entitlements
│ │ ├── DebugUniWinCApp.swift
│ │ └── Preview Content/
│ │ └── Preview Assets.xcassets/
│ │ └── Contents.json
│ └── LibUniWinC/
│ ├── CustomPanelHelper.swift
│ ├── LibUniWinC.swift
│ ├── OverlayView.swift
│ ├── README.md
│ └── UnityInterface.swift
└── docs/
└── reference/
└── html/
├── annotated.html
├── annotated_dup.js
├── class_kirurobo_1_1_bool_property_attribute.html
├── class_kirurobo_1_1_file_panel-members.html
├── class_kirurobo_1_1_file_panel.html
├── class_kirurobo_1_1_file_panel.js
├── class_kirurobo_1_1_file_panel_1_1_filter-members.html
├── class_kirurobo_1_1_file_panel_1_1_filter.html
├── class_kirurobo_1_1_file_panel_1_1_filter.js
├── class_kirurobo_1_1_file_panel_1_1_lib_uni_win_c-members.html
├── class_kirurobo_1_1_file_panel_1_1_lib_uni_win_c.html
├── class_kirurobo_1_1_file_panel_1_1_lib_uni_win_c.js
├── class_kirurobo_1_1_read_only_attribute.html
├── class_kirurobo_1_1_uni_win_core_1_1_lib_uni_win_c-members.html
├── class_kirurobo_1_1_uni_win_core_1_1_lib_uni_win_c.html
├── class_kirurobo_1_1_uni_window_controller-members.html
├── class_kirurobo_1_1_uni_window_controller.html
├── class_kirurobo_1_1_uni_window_controller.js
├── class_kirurobo_1_1_uni_window_move_handle-members.html
├── class_kirurobo_1_1_uni_window_move_handle.html
├── class_kirurobo_1_1_uni_window_move_handle.js
├── classes.html
├── dir_0e718f53d4d08174de87a4996d0abd84.html
├── dir_1168cf2394713e5b88a61dc9b39953d6.html
├── dir_4db8f2e691505777dda71083a7488821.html
├── dir_4e895f04d87c71be14ec988997553c7b.html
├── dir_51678baafa3da7bcbbacfbc079e72355.html
├── dir_8d1ea225d71cf43ce7bb9f8bd477064e.html
├── dir_9422bc27ad0eb84eb9766082ef3d355d.html
├── dir_a0d8a0ff27d847f01310e1251fc46482.html
├── dir_a545219465fede22cd758cef02b8764c.html
├── doxygen.css
├── dynsections.js
├── functions.html
├── functions_enum.html
├── functions_evnt.html
├── functions_func.html
├── functions_prop.html
├── functions_vars.html
├── hierarchy.html
├── hierarchy.js
├── index.html
├── jquery.js
├── menu.js
├── menudata.js
├── namespace_kirurobo.html
├── namespace_kirurobo.js
├── namespaces.html
├── namespaces_dup.js
├── navtree.css
├── navtree.js
├── navtreedata.js
├── navtreeindex0.js
├── resize.js
├── struct_kirurobo_1_1_file_panel_1_1_lib_uni_win_c_1_1_panel_settings-members.html
├── struct_kirurobo_1_1_file_panel_1_1_lib_uni_win_c_1_1_panel_settings.html
├── struct_kirurobo_1_1_file_panel_1_1_settings-members.html
├── struct_kirurobo_1_1_file_panel_1_1_settings.html
└── tabs.css
SYMBOL INDEX (613 symbols across 33 files)
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Editor/Scripts/UniWindowControllerBatch.cs
class UniWindowControllerBatch (line 9) | class UniWindowControllerBatch
method PerformBuild (line 12) | static void PerformBuild()
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Editor/Scripts/UniWindowControllerEditor.cs
class UniWindowControllerEditor (line 23) | [CustomEditor(typeof(UniWindowController))]
method OnEnable (line 50) | void OnEnable()
method OnDisable (line 60) | void OnDisable()
method GetUrpSettings (line 69) | private bool GetUrpSettings()
method LoadSettings (line 80) | private void LoadSettings()
method SaveSettings (line 85) | private void SaveSettings()
method OnInspectorGUI (line 96) | public override void OnInspectorGUI()
method ShowPlayerSettingsValidation (line 118) | private bool ShowPlayerSettingsValidation(bool dismissed) {
method ShowUrpSettingsValidation (line 189) | private bool ShowUrpSettingsValidation(bool dismissed) {
method FixSetting (line 249) | private void FixSetting(string message, FixMethod fixAction, bool sile...
method ShowInfo (line 278) | private void ShowInfo(string message, Object target = null)
method ValidateSettings (line 304) | private bool ValidateSettings(bool silentFix = false)
method ValidateUrpSettings (line 417) | private bool ValidateUrpSettings(bool silentFix = false)
class UniWindowControllerReadOnlyDrawer (line 468) | [CustomPropertyDrawer(typeof(ReadOnlyAttribute))]
method OnGUI (line 471) | public override void OnGUI(Rect position, SerializedProperty property,...
class UniWindowControllerDrawer (line 484) | [CustomPropertyDrawer(typeof(EditablePropertyAttribute))]
method OnGUI (line 487) | public override void OnGUI(Rect position, SerializedProperty property,...
method GetPropertyHeight (line 585) | public override float GetPropertyHeight(SerializedProperty property, G...
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/LowLevel/FilePanel.cs
class FilePanel (line 11) | public class FilePanel
class LibUniWinC (line 13) | protected class LibUniWinC
method OpenFilePanel (line 15) | [DllImport("LibUniWinC", CharSet = CharSet.Unicode)]
method OpenSavePanel (line 19) | [DllImport("LibUniWinC", CharSet = CharSet.Unicode)]
type PanelSettings (line 24) | [StructLayout(LayoutKind.Sequential, Pack = 1)]
method PanelSettings (line 34) | public PanelSettings(Settings settings)
method Dispose (line 54) | public void Dispose()
type Flag (line 93) | [Flags]
type Settings (line 110) | public struct Settings
class Filter (line 123) | public class Filter
method Filter (line 133) | public Filter(string title, params string[] extensions)
method ToString (line 139) | public override string ToString()
method Join (line 149) | public static string Join(Filter[] filters)
method OpenFilePanel (line 176) | public static void OpenFilePanel(Settings settings, Action<string[]> a...
method SaveFilePanel (line 195) | public static void SaveFilePanel(Settings settings, Action<string[]> a...
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/LowLevel/UniWinCore.cs
class UniWinCore (line 22) | internal class UniWinCore : IDisposable
type TransparentType (line 27) | public enum TransparentType : int
type WindowStateEventType (line 38) | [Flags]
class LibUniWinC (line 55) | protected class LibUniWinC
method IsActive (line 64) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method IsTransparent (line 68) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method IsBorderless (line 72) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method IsTopmost (line 76) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method IsBottommost (line 80) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method IsMaximized (line 84) | [DllImport("LibUniWinC", CallingConvention=CallingConvention.Winapi)]
method IsFreePositioningEnabled (line 88) | [DllImport("LibUniWinC", CallingConvention=CallingConvention.Winapi)]
method AttachMyWindow (line 92) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method AttachMyOwnerWindow (line 96) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method AttachMyActiveWindow (line 100) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method DetachWindow (line 104) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method Update (line 108) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method SetTransparent (line 111) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method SetBorderless (line 114) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method SetAlphaValue (line 117) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method SetClickThrough (line 120) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method SetTopmost (line 123) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method SetBottommost (line 126) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method SetMaximized (line 129) | [DllImport("LibUniWinC", CallingConvention = CallingConvention.Winapi)]
method EnableFreePositioning (line 132) | [DllImport("LibUniWinC", CallingConvention = CallingConvention.Winapi)]
method SetPosition (line 135) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method GetPosition (line 138) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method SetSize (line 142) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method GetSize (line 145) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method GetClientSize (line 149) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method GetClientRectangle (line 153) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method RegisterDropFilesCallback (line 157) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method UnregisterDropFilesCallback (line 161) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method RegisterMonitorChangedCallback (line 165) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method UnregisterMonitorChangedCallback (line 169) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method RegisterWindowStyleChangedCallback (line 173) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method UnregisterWindowStyleChangedCallback (line 177) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method SetAllowDrop (line 181) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method GetCurrentMonitor (line 185) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method GetMonitorCount (line 188) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method GetMonitorRectangle (line 191) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method SetCursorPosition (line 195) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method GetCursorPosition (line 198) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method GetMouseButtons (line 202) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method GetModifierKeys (line 205) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method SetTransparentType (line 210) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method SetKeyColor (line 213) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method GetDebugInfo (line 216) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method AttachWindowHandle (line 219) | [DllImport("LibUniWinC",CallingConvention=CallingConvention.Winapi)]
method GetGameView (line 238) | public static EditorWindow GetGameView()
method UniWinCore (line 304) | public UniWinCore()
method Dispose (line 320) | public void Dispose()
method _monitorChangedCallback (line 340) | [MonoPInvokeCallback(typeof(LibUniWinC.IntCallback))]
method _windowStyleChangedCallback (line 351) | [MonoPInvokeCallback(typeof(LibUniWinC.IntCallback))]
method _dropFilesCallback (line 363) | [MonoPInvokeCallback(typeof(LibUniWinC.StringCallback))]
method parsePaths (line 385) | internal static string[] parsePaths(string text)
method DetachWindow (line 457) | public void DetachWindow()
method AttachMyWindow (line 471) | public bool AttachMyWindow()
method AttachWindowHandle (line 493) | public bool AttachWindowHandle(IntPtr hWnd)
method AttachMyActiveWindow (line 505) | public bool AttachMyActiveWindow()
method Update (line 518) | public void Update()
method GetDebubgWindowSizeInfo (line 523) | string GetDebubgWindowSizeInfo()
method EnableTransparent (line 535) | public void EnableTransparent(bool isTransparent)
method SetAlphaValue (line 549) | public void SetAlphaValue(float alpha)
method EnableTopmost (line 561) | public void EnableTopmost(bool isTopmost)
method EnableBottommost (line 572) | public void EnableBottommost(bool isBottommost)
method EnableClickThrough (line 583) | public void EnableClickThrough(bool isThrough)
method SetZoomed (line 596) | public void SetZoomed(bool isZoomed)
method GetZoomed (line 605) | public bool GetZoomed()
method SetWindowPosition (line 614) | public void SetWindowPosition(Vector2 position)
method GetWindowPosition (line 623) | public Vector2 GetWindowPosition()
method SetWindowSize (line 634) | public void SetWindowSize(Vector2 size)
method GetWindowSize (line 643) | public Vector2 GetWindowSize()
method GetClientSize (line 654) | public Vector2 GetClientSize()
method GetClientRectangle (line 665) | public Rect GetClientRectangle()
method SetAllowDrop (line 676) | public void SetAllowDrop(bool enabled)
method ObserveDroppedFiles (line 690) | public bool ObserveDroppedFiles(out string[] files)
method ObserveMonitorChanged (line 704) | public bool ObserveMonitorChanged()
method ObserveWindowStyleChanged (line 716) | public bool ObserveWindowStyleChanged()
method ObserveWindowStyleChanged (line 729) | public bool ObserveWindowStyleChanged(out WindowStateEventType type)
method SetCursorPosition (line 750) | public static void SetCursorPosition(Vector2 position)
method GetCursorPosition (line 759) | public static Vector2 GetCursorPosition()
method GetMouseButtons (line 770) | public static int GetMouseButtons()
method GetModifierKeys (line 779) | public static int GetModifierKeys()
method GetCursorVisible (line 785) | public static bool GetCursorVisible()
method SetTransparentType (line 796) | public void SetTransparentType(TransparentType type)
method SetKeyColor (line 806) | public void SetKeyColor(Color32 color)
method EnableFreePositioning (line 818) | public void EnableFreePositioning(bool enabled)
method GetCurrentMonitor (line 830) | public int GetCurrentMonitor()
method GetMonitorCount (line 839) | public static int GetMonitorCount()
method GetMonitorRectangle (line 851) | public static bool GetMonitorRectangle(int index, out Vector2 position...
method FitToMonitor (line 861) | public bool FitToMonitor(int monitorIndex)
method DebugMonitorInfo (line 892) | [Obsolete]
method GetDebugInfo (line 918) | [Obsolete]
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowController.cs
class EditablePropertyAttribute (line 31) | [System.AttributeUsage(System.AttributeTargets.Field, Inherited = true, ...
class ReadOnlyAttribute (line 37) | [System.AttributeUsage(System.AttributeTargets.Field, Inherited = true, ...
class UniWindowController (line 46) | public class UniWindowController : MonoBehaviour
type TransparentType (line 51) | public enum TransparentType : int
type HitTestType (line 61) | public enum HitTestType : int
type WindowStateEventType (line 71) | [Flags]
type MouseButton (line 90) | [Flags]
type ModifierKey (line 102) | [Flags]
method Awake (line 386) | void Awake()
method UpdateMonitorFitting (line 443) | private void UpdateMonitorFitting()
method FindOrCreateInstance (line 469) | private static UniWindowController FindOrCreateInstance()
method Start (line 484) | void Start()
method OnDestroy (line 507) | void OnDestroy()
method StoreOriginalWindowRectangle (line 521) | void StoreOriginalWindowRectangle()
method Update (line 532) | void Update()
method UpdateEvents (line 553) | private void UpdateEvents()
method ForceZoomed (line 582) | IEnumerator ForceZoomed()
method SetCamera (line 593) | public void SetCamera(Camera newCamera)
method SetClickThrough (line 617) | void SetClickThrough(bool isThrough)
method UpdateClickThrough (line 626) | void UpdateClickThrough()
method HitTestCoroutine (line 657) | private IEnumerator HitTestCoroutine()
method GetClientCursorPosition (line 691) | private Vector2 GetClientCursorPosition()
method HitTestByOpaquePixel (line 733) | private void HitTestByOpaquePixel()
method GetOnOpaquePixel (line 756) | private bool GetOnOpaquePixel(Vector2 mousePos)
method HitTestByRaycast (line 797) | private void HitTestByRaycast()
method UpdateTargetWindow (line 854) | private void UpdateTargetWindow()
method OnApplicationFocus (line 904) | private void OnApplicationFocus(bool focus)
method SetCameraBackground (line 922) | void SetCameraBackground(bool transparent)
method SetTransparent (line 958) | private void SetTransparent(bool transparent)
method SetTransparentType (line 975) | public void SetTransparentType(TransparentType type)
method SetAlphaValue (line 998) | private void SetAlphaValue(float alpha)
method SetTopmost (line 1008) | private void SetTopmost(bool topmost)
method SetBottommost (line 1022) | private void SetBottommost(bool bottommost)
method SetZoomed (line 1035) | private void SetZoomed(bool zoomed)
method SetAllowDrop (line 1043) | private void SetAllowDrop(bool enabled)
method SetFreePositioning (line 1055) | private void SetFreePositioning(bool enabled)
method GetMonitorCount (line 1067) | public static int GetMonitorCount()
method GetMonitorRect (line 1078) | public static Rect GetMonitorRect(int index)
method FitToMonitor (line 1091) | private bool FitToMonitor(bool shouldFit, int monitorIndex)
method GetCursorPosition (line 1146) | public static Vector2 GetCursorPosition()
method SetCursorPosition (line 1155) | public static void SetCursorPosition(Vector2 position)
method GetMouseButtons (line 1164) | public static MouseButton GetMouseButtons()
method GetModifierKeys (line 1174) | public static ModifierKey GetModifierKeys()
method OnApplicationQuit (line 1183) | void OnApplicationQuit()
method Focus (line 1205) | public void Focus()
method GetDebugInfo (line 1218) | [Obsolete]
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Runtime/Scripts/UniWindowMoveHandle.cs
class UniWindowMoveHandle (line 20) | public class UniWindowMoveHandle : MonoBehaviour, IDragHandler, IBeginDr...
method Start (line 66) | void Start()
method OnBeginDrag (line 79) | public void OnBeginDrag(PointerEventData eventData)
method OnEndDrag (line 113) | public void OnEndDrag(PointerEventData eventData)
method OnPointerUp (line 122) | public void OnPointerUp(PointerEventData eventData)
method EndDragging (line 130) | private void EndDragging()
method OnDrag (line 142) | public void OnDrag(PointerEventData eventData)
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Samples/00_Menu/SampleManager.cs
class SampleManager (line 9) | public class SampleManager : MonoBehaviour
method Awake (line 16) | private void Awake()
method SceneManager_sceneLoaded (line 36) | private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1)
method LoadScene (line 45) | public void LoadScene(string name)
method Quit (line 64) | public void Quit()
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Samples/02_UiSample/UiSampleController.cs
class UiSampleController (line 18) | public class UiSampleController : MonoBehaviour
method Start (line 60) | void Start()
method ShowEventMessage (line 138) | private void ShowEventMessage(string message)
method Update (line 149) | private void Update()
method ResetTouchDuration (line 299) | void ResetTouchDuration() {
method SetFitToMonitor (line 309) | void SetFitToMonitor(int val)
method ShowWindowMetrics (line 335) | void ShowWindowMetrics()
method OnApplicationFocus (line 356) | private void OnApplicationFocus(bool hasFocus)
method ShowMenu (line 378) | private void ShowMenu(Vector2 position)
method CloseMenu (line 401) | private void CloseMenu()
method UpdateUI (line 412) | private void UpdateUI()
method UpdateHitTestUI (line 494) | public void UpdateHitTestUI()
method UpdateMonitorDropdown (line 544) | void UpdateMonitorDropdown()
method OutputMessage (line 573) | public void OutputMessage(string text)
method ShowClientSize (line 588) | public void ShowClientSize()
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Samples/03_Fullscreen/FullscreenSample.cs
class FullscreenSample (line 16) | public class FullscreenSample : MonoBehaviour
method Start (line 38) | void Start()
method Update (line 82) | private void Update()
method Quit (line 154) | void Quit()
method SetFitToMonitor (line 167) | void SetFitToMonitor(int val)
method ShowMenu (line 188) | private void ShowMenu(Vector2 position)
method CloseMenu (line 212) | private void CloseMenu()
method UpdateUI (line 223) | private void UpdateUI()
method UpdateMonitorDropdown (line 261) | void UpdateMonitorDropdown()
method ShowEventMessage (line 290) | private void ShowEventMessage(string message)
method OutputMessage (line 299) | public void OutputMessage(string text)
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Samples/04_FileDialog/FileDialogSample.cs
class FileDialogSample (line 11) | public class FileDialogSample : MonoBehaviour
method Start (line 19) | void Start()
method Update (line 28) | void Update()
method OpenSingleFile (line 36) | private void OpenSingleFile() {
method OpenMultipleFiles (line 57) | private void OpenMultipleFiles() {
method OpenSaveFile (line 79) | private void OpenSaveFile() {
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Samples/Common/AutoRotator.cs
class AutoRotator (line 7) | public class AutoRotator : MonoBehaviour {
method Start (line 24) | void Start () {
method Update (line 30) | void Update () {
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Samples/Common/InputModuleProxy.cs
class InputModuleProxy (line 15) | public class InputModuleProxy : UnityEngine.EventSystems.StandaloneInput...
class InputModuleProxy (line 19) | public class InputModuleProxy : UnityEngine.InputSystem.UI.InputSystemUI...
class InputModuleProxy (line 23) | public class InputModuleProxy
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Samples/Common/InputProxy.cs
class InputProxy (line 20) | public class InputProxy
method GetKeyUp (line 32) | public static bool GetKeyUp(String key)
method GetMousePosition (line 71) | private static Vector3 GetMousePosition()
method GetMouseButton (line 87) | public static bool GetMouseButton(int button)
method GetMouseButtonDown (line 106) | public static bool GetMouseButtonDown(int button)
method GetMouseButtonUp (line 125) | public static bool GetMouseButtonUp(int button) {
FILE: UniWinC/Assets/Kirurobo/UniWindowController/Samples/Common/ModelController.cs
class ModelController (line 15) | public class ModelController : MonoBehaviour
type RotationAxes (line 17) | [Flags]
type DragState (line 26) | [Flags]
method Start (line 64) | void Start()
method OnDestroy (line 70) | void OnDestroy()
method Update (line 76) | void Update()
method Initialize (line 87) | internal void Initialize()
method SetupTransform (line 112) | internal void SetupTransform()
method ResetTransform (line 124) | public void ResetTransform()
method UpdateTransform (line 136) | internal void UpdateTransform()
method HandleMouse (line 145) | internal virtual void HandleMouse()
method IsHit (line 255) | internal bool IsHit(Vector3 screenPosition)
method ClampAngle (line 275) | public static float ClampAngle(float angle, float min, float max)
FILE: VisualStudio/LibUniWinC/dllmain.cpp
function BOOL (line 4) | BOOL APIENTRY DllMain( HMODULE hModule,
FILE: VisualStudio/LibUniWinC/libuniwinc.cpp
function detachWindow (line 59) | void detachWindow()
function attachWindow (line 98) | void attachWindow(const HWND hWnd) {
function BOOL (line 138) | BOOL CALLBACK attachOwnerWindowProc(const HWND hWnd, const LPARAM lParam)
function BOOL (line 177) | BOOL CALLBACK findOwnerWindowProc(const HWND hWnd, const LPARAM lParam)
function BOOL (line 209) | BOOL CALLBACK findDesktopWindowProc(const HWND hWnd, const LPARAM lParam)
function BOOL (line 246) | BOOL CALLBACK monitorEnumProc(HMONITOR hMon, HDC hDc, LPRECT lpRect, LPA...
function BOOL (line 276) | BOOL updateMonitorRectangles() {
function enableTransparentByDWM (line 306) | void enableTransparentByDWM()
function disableTransparentByDWM (line 317) | void disableTransparentByDWM()
function applyWindowAlphaValue (line 330) | void applyWindowAlphaValue() {
function enableTransparentBySetLayered (line 351) | void enableTransparentBySetLayered()
function disableTransparentBySetLayered (line 369) | void disableTransparentBySetLayered()
function findDesktopWindow (line 380) | void findDesktopWindow() {
function refreshWindowRect (line 388) | void refreshWindowRect() {
function BOOL (line 426) | BOOL compareRect(const RECT rcA, const RECT rcB) {
function updateScreenSize (line 434) | void updateScreenSize() {
function BOOL (line 446) | BOOL getTopMost() {
function BOOL (line 473) | BOOL UNIWINC_API IsActive() {
function BOOL (line 484) | BOOL UNIWINC_API IsTransparent() {
function BOOL (line 492) | BOOL UNIWINC_API IsBorderless() {
function BOOL (line 500) | BOOL UNIWINC_API IsTopmost() {
function BOOL (line 508) | BOOL UNIWINC_API IsBottommost() {
function BOOL (line 516) | BOOL UNIWINC_API IsBackground() {
function BOOL (line 524) | BOOL UNIWINC_API IsMaximized() {
function BOOL (line 532) | BOOL UNIWINC_API IsMinimized() {
function BOOL (line 540) | BOOL UNIWINC_API IsFreePositioningEnabled()
function BOOL (line 549) | BOOL UNIWINC_API DetachWindow() {
function BOOL (line 558) | BOOL UNIWINC_API AttachMyWindow() {
function BOOL (line 566) | BOOL UNIWINC_API AttachMyOwnerWindow() {
function HWND (line 575) | HWND FindOwnerWindowHandle() {
function BOOL (line 589) | BOOL UNIWINC_API AttachMyActiveWindow() {
function BOOL (line 606) | BOOL UNIWINC_API AttachWindowHandle(const HWND hWnd) {
function BOOL (line 983) | BOOL UNIWINC_API SetPosition(const float x, const float y) {
function BOOL (line 1008) | BOOL UNIWINC_API GetPosition(float* x, float* y) {
function BOOL (line 1029) | BOOL UNIWINC_API SetSize(const float width, const float height) {
function BOOL (line 1057) | BOOL UNIWINC_API GetSize(float* width, float* height) {
function BOOL (line 1078) | BOOL UNIWINC_API GetClientSize(float* width, float* height) {
function BOOL (line 1101) | BOOL UNIWINC_API GetClientRectangle(float* x, float* y, float* width, fl...
function BOOL (line 1134) | BOOL UNIWINC_API RegisterWindowStyleChangedCallback(WindowStyleChangedCa...
function BOOL (line 1145) | BOOL UNIWINC_API UnregisterWindowStyleChangedCallback() {
function INT32 (line 1161) | INT32 UNIWINC_API GetCurrentMonitor() {
function INT32 (line 1208) | INT32 UNIWINC_API GetMonitorCount() {
function BOOL (line 1220) | BOOL UNIWINC_API GetMonitorRectangle(const INT32 monitorIndex, float* x...
function BOOL (line 1243) | BOOL UNIWINC_API RegisterMonitorChangedCallback(MonitorChangedCallback c...
function BOOL (line 1254) | BOOL UNIWINC_API UnregisterMonitorChangedCallback() {
function BOOL (line 1271) | BOOL UNIWINC_API GetCursorPosition(float* x, float* y) {
function BOOL (line 1291) | BOOL UNIWINC_API SetCursorPosition(const float x, const float y) {
function INT32 (line 1304) | INT32 UNIWINC_API GetMouseButtons() {
function INT32 (line 1322) | INT32 UNIWINC_API GetModifierKeys() {
function BOOL (line 1350) | BOOL receiveDropFiles(HDROP hDrop) {
function LRESULT (line 1400) | LRESULT CALLBACK customWindowProcedure(HWND hWnd, UINT uMsg, WPARAM wPar...
function WNDPROC (line 1468) | WNDPROC setWindowProcedure(WNDPROC wndProc) {
function destroyCustomWindowProcedure (line 1482) | void destroyCustomWindowProcedure() {
function createCustomWindowProcedure (line 1497) | void createCustomWindowProcedure() {
function BOOL (line 1581) | BOOL UNIWINC_API SetAllowDrop(const BOOL bEnabled)
function BOOL (line 1603) | BOOL UNIWINC_API RegisterDropFilesCallback(FilesCallback callback) {
function BOOL (line 1614) | BOOL UNIWINC_API UnregisterDropFilesCallback() {
function BOOL (line 1630) | BOOL parsePaths(LPWSTR lpBuffer, const UINT32 nBufferLength) {
function LPWSTR (line 1725) | LPWSTR createDefaultExtString(const LPWSTR lpsFormTypeFilterText) {
function LPWSTR (line 1793) | LPWSTR createFilterString(const LPWSTR lpsFormTypeFilterText) {
function DWORD (line 1863) | DWORD GetPanelFlags(const INT32 flags) {
function BOOL (line 1876) | BOOL UNIWINC_API OpenFilePanel(const PPANELSETTINGS pSettings, LPWSTR pR...
function BOOL (line 1924) | BOOL UNIWINC_API OpenSavePanel(const PPANELSETTINGS pSettings, LPWSTR pR...
function INT32 (line 1979) | INT32 UNIWINC_API GetDebugInfo() {
function HWND (line 1991) | HWND UNIWINC_API GetWindowHandle() {
function HWND (line 1999) | HWND UNIWINC_API GetDesktopWindowHandle() {
function DWORD (line 2007) | DWORD UNIWINC_API GetMyProcessId() {
FILE: VisualStudio/LibUniWinC/libuniwinc.h
type class (line 20) | enum class
type class (line 27) | enum class
type class (line 42) | enum class
type PANELSETTINGS (line 55) | typedef struct tagPANELSETTINGS {
FILE: VisualStudio/TestLibUniWinC/Additional/WindowInfo.cs
class WindowInfo (line 14) | internal class WindowInfo
method WindowInfo (line 21) | public WindowInfo(IntPtr hWnd, Process process, string title, bool isC...
method ToString (line 29) | override public string ToString()
FILE: VisualStudio/TestLibUniWinC/Additional/WindowList.cs
class WindowList (line 14) | internal class WindowList
method EnumWindows (line 19) | [DllImport("user32.dll", SetLastError = true)]
method EnumChildWindows (line 23) | [DllImport("user32.dll", SetLastError = true)]
method GetWindowText (line 27) | [DllImport("user32.dll", CharSet = CharSet.Auto)]
method GetClassName (line 30) | [DllImport("user32.dll", CharSet = CharSet.Auto)]
method GetWindowThreadProcessId (line 33) | [DllImport("user32.dll")]
method IsWindowVisible (line 36) | [DllImport("user32.dll")]
method Load (line 49) | public void Load(bool includeChildren = false)
method GetArray (line 99) | public WindowInfo[] GetArray()
FILE: VisualStudio/TestLibUniWinC/FormMain.Designer.cs
class FormMain (line 3) | partial class FormMain
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: VisualStudio/TestLibUniWinC/FormMain.cs
class FormMain (line 12) | public partial class FormMain : Form
method FormMain (line 32) | public FormMain()
method InitializeControls (line 42) | private void InitializeControls()
method FormMain_Shown (line 83) | private void FormMain_Shown(object sender, EventArgs e)
method UpdateMonitorCombobox (line 103) | private void UpdateMonitorCombobox()
method PrintMonitorInfo (line 128) | private void PrintMonitorInfo()
method PrintWindowInfo (line 150) | private void PrintWindowInfo()
method DumpStringArray (line 179) | private void DumpStringArray(string[] array)
method buttonCheck_Click (line 188) | private void buttonCheck_Click(object sender, EventArgs e)
method buttonOpenFile_Click (line 193) | private void buttonOpenFile_Click(object sender, EventArgs e)
method buttonSaveFile_Click (line 210) | private void buttonSaveFile_Click(object sender, EventArgs e)
method FitToMonitor (line 230) | private void FitToMonitor(int monitor)
method UpdateWindowListCombobox (line 238) | private void UpdateWindowListCombobox()
method checkBoxTransparent_CheckedChanged (line 258) | private void checkBoxTransparent_CheckedChanged(object sender, EventAr...
method checkBoxTopmost_CheckedChanged (line 267) | private void checkBoxTopmost_CheckedChanged(object sender, EventArgs e)
method checkBoxBottommost_CheckedChanged (line 277) | private void checkBoxBottommost_CheckedChanged(object sender, EventArg...
method checkBoxAllowDrop_CheckedChanged (line 287) | private void checkBoxAllowDrop_CheckedChanged(object sender, EventArgs e)
method FormMain_Resize (line 296) | private void FormMain_Resize(object sender, EventArgs e)
method buttonShowMonitorInfo_Click (line 301) | private void buttonShowMonitorInfo_Click(object sender, EventArgs e)
method buttonFitMonitor_Click (line 306) | private void buttonFitMonitor_Click(object sender, EventArgs e)
method PerformEvent (line 312) | private void PerformEvent()
method timerMainLoop_Tick (line 340) | private void timerMainLoop_Tick(object sender, EventArgs e)
method trackBarAlpha_Scroll (line 352) | private void trackBarAlpha_Scroll(object sender, EventArgs e)
method FormMain_MouseDown (line 358) | private void FormMain_MouseDown(object sender, MouseEventArgs e)
method FormMain_MouseMove (line 367) | private void FormMain_MouseMove(object sender, MouseEventArgs e)
method FormMain_MouseUp (line 376) | private void FormMain_MouseUp(object sender, MouseEventArgs e)
method comboBoxTransparentType_SelectedIndexChanged (line 384) | private void comboBoxTransparentType_SelectedIndexChanged(object sende...
method buttonSetTarget_Click (line 395) | private void buttonSetTarget_Click(object sender, EventArgs e)
FILE: VisualStudio/TestLibUniWinC/LowLevel/FilePanel.cs
class FilePanel (line 11) | public class FilePanel
class LibUniWinC (line 13) | protected class LibUniWinC
method OpenFilePanel (line 15) | [DllImport("LibUniWinC", CharSet = CharSet.Unicode)]
method OpenSavePanel (line 19) | [DllImport("LibUniWinC", CharSet = CharSet.Unicode)]
type PanelSettings (line 24) | [StructLayout(LayoutKind.Sequential, Pack = 1)]
method PanelSettings (line 34) | public PanelSettings(Settings settings)
method Dispose (line 54) | public void Dispose()
type Flag (line 93) | [Flags]
type Settings (line 110) | public struct Settings
class Filter (line 123) | public class Filter
method Filter (line 133) | public Filter(string title, params string[] extensions)
method ToString (line 139) | public override string ToString()
method Join (line 149) | public static string Join(Filter[] filters)
method OpenFilePanel (line 176) | public static void OpenFilePanel(Settings settings, Action<string[]> a...
method SaveFilePanel (line 195) | public static void SaveFilePanel(Settings settings, Action<string[]> a...
FILE: VisualStudio/TestLibUniWinC/LowLevel/UniWinCore.cs
class UniWinCore (line 23) | internal class UniWinCore : IDisposable
type TransparentType (line 28) | public enum TransparentType : int
type WindowStateEventType (line 39) | [Flags]
class LibUniWinC (line 56) | protected class LibUniWinC
method IsActive (line 65) | [DllImport("LibUniWinC")]
method IsTransparent (line 69) | [DllImport("LibUniWinC")]
method IsBorderless (line 73) | [DllImport("LibUniWinC")]
method IsTopmost (line 77) | [DllImport("LibUniWinC")]
method IsBottommost (line 81) | [DllImport("LibUniWinC")]
method IsMaximized (line 85) | [DllImport("LibUniWinC")]
method AttachMyWindow (line 89) | [DllImport("LibUniWinC")]
method AttachMyOwnerWindow (line 93) | [DllImport("LibUniWinC")]
method AttachMyActiveWindow (line 97) | [DllImport("LibUniWinC")]
method DetachWindow (line 101) | [DllImport("LibUniWinC")]
method Update (line 105) | [DllImport("LibUniWinC")]
method SetTransparent (line 108) | [DllImport("LibUniWinC")]
method SetBorderless (line 111) | [DllImport("LibUniWinC")]
method SetAlphaValue (line 114) | [DllImport("LibUniWinC")]
method SetClickThrough (line 117) | [DllImport("LibUniWinC")]
method SetTopmost (line 120) | [DllImport("LibUniWinC")]
method SetBottommost (line 123) | [DllImport("LibUniWinC")]
method SetMaximized (line 126) | [DllImport("LibUniWinC")]
method SetPosition (line 129) | [DllImport("LibUniWinC")]
method GetPosition (line 132) | [DllImport("LibUniWinC")]
method SetSize (line 136) | [DllImport("LibUniWinC")]
method GetSize (line 139) | [DllImport("LibUniWinC")]
method GetClientSize (line 143) | [DllImport("LibUniWinC")]
method GetClientRectangle (line 147) | [DllImport("LibUniWinC")]
method RegisterDropFilesCallback (line 151) | [DllImport("LibUniWinC")]
method UnregisterDropFilesCallback (line 155) | [DllImport("LibUniWinC")]
method RegisterMonitorChangedCallback (line 159) | [DllImport("LibUniWinC")]
method UnregisterMonitorChangedCallback (line 163) | [DllImport("LibUniWinC")]
method RegisterWindowStyleChangedCallback (line 167) | [DllImport("LibUniWinC")]
method UnregisterWindowStyleChangedCallback (line 171) | [DllImport("LibUniWinC")]
method SetAllowDrop (line 175) | [DllImport("LibUniWinC")]
method GetCurrentMonitor (line 179) | [DllImport("LibUniWinC")]
method GetMonitorCount (line 182) | [DllImport("LibUniWinC")]
method GetMonitorRectangle (line 185) | [DllImport("LibUniWinC")]
method SetCursorPosition (line 189) | [DllImport("LibUniWinC")]
method GetCursorPosition (line 192) | [DllImport("LibUniWinC")]
method SetTransparentType (line 198) | [DllImport("LibUniWinC")]
method SetKeyColor (line 201) | [DllImport("LibUniWinC")]
method GetDebugInfo (line 204) | [DllImport("LibUniWinC")]
method AttachWindowHandle (line 207) | [DllImport("LibUniWinC")]
method GetGameView (line 226) | public static EditorWindow GetGameView()
method UniWinCore (line 280) | public UniWinCore()
method Dispose (line 296) | public void Dispose()
method _monitorChangedCallback (line 316) | [MonoPInvokeCallback(typeof(LibUniWinC.IntCallback))]
method _windowStyleChangedCallback (line 327) | [MonoPInvokeCallback(typeof(LibUniWinC.IntCallback))]
method _dropFilesCallback (line 339) | [MonoPInvokeCallback(typeof(LibUniWinC.StringCallback))]
method parsePaths (line 361) | internal static string[] parsePaths(string text)
method DetachWindow (line 433) | public void DetachWindow()
method AttachMyWindow (line 447) | public bool AttachMyWindow()
method AttachWindowHandle (line 469) | public bool AttachWindowHandle(IntPtr hWnd)
method AttachMyActiveWindow (line 481) | public bool AttachMyActiveWindow()
method Update (line 494) | public void Update()
method GetDebubgWindowSizeInfo (line 499) | string GetDebubgWindowSizeInfo()
method EnableTransparent (line 511) | public void EnableTransparent(bool isTransparent)
method SetAlphaValue (line 525) | public void SetAlphaValue(float alpha)
method EnableTopmost (line 537) | public void EnableTopmost(bool isTopmost)
method EnableBottommost (line 548) | public void EnableBottommost(bool isBottommost)
method EnableClickThrough (line 559) | public void EnableClickThrough(bool isThrough)
method SetZoomed (line 572) | public void SetZoomed(bool isZoomed)
method GetZoomed (line 581) | public bool GetZoomed()
method SetWindowPosition (line 590) | public void SetWindowPosition(Vector2 position)
method GetWindowPosition (line 599) | public Vector2 GetWindowPosition()
method SetWindowSize (line 610) | public void SetWindowSize(Vector2 size)
method GetWindowSize (line 619) | public Vector2 GetWindowSize()
method GetClientSize (line 630) | public Vector2 GetClientSize()
method GetClientRectangle (line 641) | public Rect GetClientRectangle()
method SetAllowDrop (line 652) | public void SetAllowDrop(bool enabled)
method ObserveDroppedFiles (line 666) | public bool ObserveDroppedFiles(out string[] files)
method ObserveMonitorChanged (line 680) | public bool ObserveMonitorChanged()
method ObserveWindowStyleChanged (line 692) | public bool ObserveWindowStyleChanged()
method ObserveWindowStyleChanged (line 705) | public bool ObserveWindowStyleChanged(out WindowStateEventType type)
method SetCursorPosition (line 726) | public static void SetCursorPosition(Vector2 position)
method GetCursorPosition (line 735) | public static Vector2 GetCursorPosition()
method GetCursorVisible (line 743) | public static bool GetCursorVisible()
method SetTransparentType (line 754) | public void SetTransparentType(TransparentType type)
method SetKeyColor (line 764) | public void SetKeyColor(Color32 color)
method GetCurrentMonitor (line 776) | public int GetCurrentMonitor()
method GetMonitorCount (line 785) | public static int GetMonitorCount()
method GetMonitorRectangle (line 797) | public static bool GetMonitorRectangle(int index, out Vector2 position...
method FitToMonitor (line 807) | public bool FitToMonitor(int monitorIndex)
method DebugMonitorInfo (line 838) | [Obsolete]
method GetDebugInfo (line 864) | [Obsolete]
FILE: VisualStudio/TestLibUniWinC/Program.cs
class Program (line 7) | static class Program
method Main (line 12) | [STAThread]
FILE: VisualStudio/TestLibUniWinC/Properties/Resources.Designer.cs
class Resources (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
method Resources (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...
FILE: VisualStudio/TestLibUniWinC/Properties/Settings.Designer.cs
class Settings (line 14) | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
FILE: VisualStudio/TestLibUniWinC/UnityEmulation/AOT.cs
class MonoPInvokeCallbackAttribute (line 5) | public class MonoPInvokeCallbackAttribute : Attribute
method MonoPInvokeCallbackAttribute (line 9) | public MonoPInvokeCallbackAttribute(Type type)
FILE: VisualStudio/TestLibUniWinC/UnityEmulation/UnityEngine.cs
type Color32 (line 6) | public struct Color32
method Color32 (line 13) | public Color32(byte r, byte g, byte b, byte a)
type Vector2 (line 22) | [StructLayout(LayoutKind.Sequential)]
method Vector2 (line 28) | public Vector2(float x, float y)
method ToString (line 46) | override public string ToString()
type Rect (line 52) | [StructLayout(LayoutKind.Sequential)]
method Rect (line 60) | public Rect(float x, float y, float width, float height)
class Debug (line 71) | public class Debug
method Log (line 73) | public static void Log(string text)
FILE: docs/reference/html/dynsections.js
function toggleVisibility (line 25) | function toggleVisibility(linkObj)
function updateStripes (line 46) | function updateStripes()
function toggleLevel (line 52) | function toggleLevel(level)
function toggleFolder (line 73) | function toggleFolder(id)
function toggleInherit (line 108) | function toggleInherit(id)
FILE: docs/reference/html/jquery.js
function b (line 2) | function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e...
function w (line 2) | function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof...
function p (line 2) | function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e...
function se (line 2) | function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeTy...
function ue (line 2) | function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cac...
function le (line 2) | function le(e){return e[S]=!0,e}
function ce (line 2) | function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(...
function fe (line 2) | function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[...
function pe (line 2) | function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourc...
function de (line 2) | function de(t){return function(e){return"input"===e.nodeName.toLowerCase...
function he (line 2) | function he(n){return function(e){var t=e.nodeName.toLowerCase();return(...
function ge (line 2) | function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e....
function ve (line 2) | function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,...
function ye (line 2) | function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}
function me (line 2) | function me(){}
function xe (line 2) | function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}
function be (line 2) | function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r...
function we (line 2) | function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r-...
function Te (line 2) | function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(...
function Ce (line 2) | function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)...
function Ee (line 2) | function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.r...
function A (line 2) | function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerC...
function j (line 2) | function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,...
function O (line 2) | function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}
function R (line 2) | function R(e){return e}
function M (line 2) | function M(e){throw e}
function I (line 2) | function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n...
function l (line 2) | function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(...
function B (line 2) | function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventLi...
function U (line 2) | function U(e,t){return t.toUpperCase()}
function X (line 2) | function X(e){return e.replace(_,"ms-").replace(z,U)}
function G (line 2) | function G(){this.expando=S.expando+G.uid++}
function Z (line 2) | function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.r...
function se (line 2) | function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:functio...
function le (line 2) | function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[...
function ve (line 2) | function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagNa...
function ye (line 2) | function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",...
function xe (line 2) | function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),...
function we (line 2) | function we(){return!0}
function Te (line 2) | function Te(){return!1}
function Ce (line 2) | function Ce(e,t){return e===function(){try{return E.activeElement}catch(...
function Ee (line 2) | function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"...
function Se (line 2) | function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handle...
function je (line 2) | function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"...
function De (line 2) | function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}
function qe (line 2) | function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.sli...
function Le (line 2) | function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=...
function He (line 2) | function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],...
function Oe (line 2) | function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)...
function We (line 2) | function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n....
function Fe (line 2) | function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(...
function e (line 2) | function e(){if(l){u.style.cssText="position:absolute;left:-11111px;widt...
function t (line 2) | function t(e){return Math.round(parseFloat(e))}
function ze (line 2) | function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=fun...
function Ye (line 2) | function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[...
function Qe (line 2) | function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border...
function Je (line 2) | function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&"border-bo...
function Ke (line 2) | function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}
function ot (line 2) | function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnima...
function at (line 2) | function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}
function st (line 2) | function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin...
function ut (line 2) | function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["...
function lt (line 2) | function lt(o,e,t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().alw...
function ht (line 2) | function ht(e){return(e.match(P)||[]).join(" ")}
function gt (line 2) | function gt(e){return e.getAttribute&&e.getAttribute("class")||""}
function vt (line 2) | function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)|...
function At (line 2) | function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r|...
function It (line 2) | function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var ...
function Wt (line 2) | function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!...
function Ft (line 2) | function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)voi...
function l (line 2) | function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=vo...
function e (line 8) | function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),...
function t (line 8) | function t(){return i.prototype[e].apply(this,arguments)}
function n (line 8) | function n(t){return i.prototype[e].apply(this,t)}
function i (line 8) | function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[...
function r (line 8) | function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-st...
function i (line 8) | function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}
function e (line 8) | function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFl...
function i (line 8) | function i(e,i){return parseInt(t.css(e,i),10)||0}
function s (line 8) | function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e...
function s (line 8) | function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"pa...
function n (line 15) | function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase()...
function h (line 15) | function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}
function k (line 15) | function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&funct...
function CSSCoordinates (line 23) | function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.ri...
function DisplayController (line 23) | function DisplayController(element,options,tipController){var hoverTimer...
function PlacementCalculator (line 23) | function PlacementCalculator(){function computePlacementCoords(element,p...
function TooltipController (line 23) | function TooltipController(options){var placementCalculator=new Placemen...
function isSvgElement (line 23) | function isSvgElement(element){return Boolean(window.SVGElement&&element...
function isMouseEvent (line 23) | function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,...
function initTracking (line 23) | function initTracking(){if(!session.mouseTrackingActive){session.mouseTr...
function getViewportDimensions (line 23) | function getViewportDimensions(){session.scrollLeft=$window.scrollLeft()...
function trackResize (line 23) | function trackResize(){session.windowWidth=$window.width();session.windo...
function trackScroll (line 23) | function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();...
function trackMouse (line 23) | function trackMouse(event){session.currentX=event.pageX;session.currentY...
function isMouseOver (line 23) | function isMouseOver(element){var elementPosition=element.offset(),eleme...
function getTooltipContent (line 23) | function getTooltipContent(element){var tipText=element.data(DATA_POWERT...
function getViewportCollisions (line 23) | function getViewportCollisions(coords,elementWidth,elementHeight){var vi...
function countFlags (line 23) | function countFlags(value){var count=0;while(value){value&=value-1;count...
function f (line 33) | function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault...
function initMouseDetection (line 35) | function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetecti...
function isTouchEvent (line 35) | function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}
function getEventsNS (line 35) | function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ...
FILE: docs/reference/html/menu.js
function initMenu (line 25) | function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
FILE: docs/reference/html/navtree.js
function getData (line 29) | function getData(varName)
function stripPath (line 36) | function stripPath(uri)
function stripPath2 (line 41) | function stripPath2(uri)
function hashValue (line 49) | function hashValue()
function hashUrl (line 54) | function hashUrl()
function pathName (line 59) | function pathName()
function localStorageSupported (line 64) | function localStorageSupported()
function storeLink (line 74) | function storeLink(link)
function deleteLink (line 81) | function deleteLink()
function cachedLink (line 88) | function cachedLink()
function getScript (line 97) | function getScript(scriptName,func,show)
function createIndent (line 108) | function createIndent(o,domNode,node,level)
function gotoAnchor (line 143) | function gotoAnchor(anchor,aname,updateLocation)
function newNode (line 172) | function newNode(o, po, text, link, childrenData, lastNode)
function showRoot (line 253) | function showRoot()
function expandNode (line 268) | function expandNode(o, node, imm, showRoot)
function glowEffect (line 288) | function glowEffect(n,duration)
function highlightAnchor (line 295) | function highlightAnchor()
function selectAndHighlight (line 313) | function selectAndHighlight(hash,n)
function showNode (line 339) | function showNode(o, node, index, hash)
function removeToInsertLater (line 380) | function removeToInsertLater(element) {
function getNode (line 393) | function getNode(o, po)
function gotoNode (line 406) | function gotoNode(o,subIndex,root,hash,relpath)
function navTo (line 421) | function navTo(o,root,hash,relpath)
function showSyncOff (line 451) | function showSyncOff(n,relpath)
function showSyncOn (line 456) | function showSyncOn(n,relpath)
function toggleSyncButton (line 461) | function toggleSyncButton(relpath)
function initNavTree (line 487) | function initNavTree(toroot,relpath)
FILE: docs/reference/html/resize.js
function initResizable (line 25) | function initResizable()
Condensed preview — 242 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,912K chars).
[
{
"path": ".github/workflows/main.yml",
"chars": 1486,
"preview": "name: Generate preview-upm branches\n\n# Reference\n# - https://tips.hecomi.com/entry/2021/10/29/001304\n\non:\n push:\n br"
},
{
"path": ".github/workflows/upm.yml",
"chars": 2219,
"preview": "name: Generate upm branches\n\n# Reference\n# - https://tips.hecomi.com/entry/2021/10/29/001304\n\non:\n push:\n # main ブラン"
},
{
"path": ".gitignore",
"chars": 16,
"preview": "/.vs/\n.DS_Store\n"
},
{
"path": "LICENSE.txt",
"chars": 1065,
"preview": "MIT License\n\nCopyright (c) 2020 Kirurobo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\no"
},
{
"path": "README-ja.md",
"chars": 5907,
"preview": "# UniWindowController\nUnified window controller for macOS and Windows \n略称:UniWinC(ユニウィンク)\n\n[\nhttps://github.com/kirurobo/UniWindowController\n\n<!---\nHow to write the chang"
},
{
"path": "UniWinC/Assets/Kirurobo/UniWindowController/CHANGELOG.md.meta",
"chars": 158,
"preview": "fileFormatVersion: 2\nguid: 2a3fc0316b219b443a628c9942d8615c\nTextScriptImporter:\n externalObjects: {}\n userData: \n ass"
},
{
"path": "UniWinC/Assets/Kirurobo/UniWindowController/Editor/Kirurobo.UniWindowController.Editor.asmdef",
"chars": 443,
"preview": "{\n \"name\": \"Kirurobo.UniWindowController.Editor\",\n \"rootNamespace\": \"\",\n \"references\": [\n \"GUID:785f7152"
},
{
"path": "UniWinC/Assets/Kirurobo/UniWindowController/Editor/Kirurobo.UniWindowController.Editor.asmdef.meta",
"chars": 166,
"preview": "fileFormatVersion: 2\nguid: 4379ff61160dc9f44a938ad4192f6dca\nAssemblyDefinitionImporter:\n externalObjects: {}\n userData"
},
{
"path": "UniWinC/Assets/Kirurobo/UniWindowController/Editor/Scripts/UniWindowControllerBatch.cs",
"chars": 2419,
"preview": "using UnityEngine;\nusing UnityEditor;\nusing UnityEditor.Build;\nusing UnityEditor.Build.Reporting;\n// ReSharper disable "
},
{
"path": "UniWinC/Assets/Kirurobo/UniWindowController/Editor/Scripts/UniWindowControllerBatch.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 2014dd28aebdf44169eed3f90f3ab550\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "UniWinC/Assets/Kirurobo/UniWindowController/Editor/Scripts/UniWindowControllerEditor.cs",
"chars": 20975,
"preview": "/*\n * UniWindowControllerEditor.cs\n *\n * Author: Kirurobo http://x.com/kirurobo\n * License: MIT\n */\n\n// Assembry Defini"
},
{
"path": "UniWinC/Assets/Kirurobo/UniWindowController/Editor/Scripts/UniWindowControllerEditor.cs.meta",
"chars": 262,
"preview": "fileFormatVersion: 2\nguid: 168ecf5237c13ad4bb159250b8844a4f\ntimeCreated: 1545989238\nlicenseType: Pro\nMonoImporter:\n ser"
},
{
"path": "UniWinC/Assets/Kirurobo/UniWindowController/Editor/Scripts.meta",
"chars": 150,
"preview": "fileFormatVersion: 2\nguid: 6b954f68e26eeb84bbd93cec0bcc9339\nfolderAsset: yes\nDefaultImporter:\n userData: \n assetBundle"
},
{
"path": "UniWinC/Assets/Kirurobo/UniWindowController/Editor.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: dad4816674a57b84dba9fe5f0426e850\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "UniWinC/Assets/Kirurobo/UniWindowController/LICENSE.md",
"chars": 1065,
"preview": "MIT License\n\nCopyright (c) 2020 Kirurobo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\no"
},
{
"path": "UniWinC/Assets/Kirurobo/UniWindowController/LICENSE.md.meta",
"chars": 155,
"preview": "fileFormatVersion: 2\nguid: 1dc8c66666c365440a7da6a4f311f249\nDefaultImporter:\n externalObjects: {}\n userData: \n assetB"
},
{
"path": "UniWinC/Assets/Kirurobo/UniWindowController/README-ja.md",
"chars": 5907,
"preview": "# UniWindowController\nUnified window controller for macOS and Windows \n略称:UniWinC(ユニウィンク)\n\n[\n"
},
{
"path": "UniWinC/ProjectSettings/QualitySettings.asset",
"chars": 9087,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!47 &1\nQualitySettings:\n m_ObjectHideFlags: 0\n serializedVersion: 5\n m"
},
{
"path": "UniWinC/ProjectSettings/SceneTemplateSettings.json",
"chars": 3534,
"preview": "{\n \"templatePinStates\": [],\n \"dependencyTypeInfos\": [\n {\n \"userAdded\": false,\n \"type\""
},
{
"path": "UniWinC/ProjectSettings/TagManager.asset",
"chars": 392,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!78 &1\nTagManager:\n serializedVersion: 2\n tags: []\n layers:\n - Defaul"
},
{
"path": "UniWinC/ProjectSettings/TimeManager.asset",
"chars": 195,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!5 &1\nTimeManager:\n m_ObjectHideFlags: 0\n Fixed Timestep: 0.02\n Maximu"
},
{
"path": "UniWinC/ProjectSettings/UnityConnectSettings.asset",
"chars": 943,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!310 &1\nUnityConnectSettings:\n m_ObjectHideFlags: 0\n serializedVersion:"
},
{
"path": "UniWinC/ProjectSettings/VFXManager.asset",
"chars": 273,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!937362698 &1\nVFXManager:\n m_ObjectHideFlags: 0\n m_IndirectShader: {fil"
},
{
"path": "UniWinC/ProjectSettings/VersionControlSettings.asset",
"chars": 188,
"preview": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!890905787 &1\nVersionControlSettings:\n m_ObjectHideFlags: 0\n m_Mode: Vi"
},
{
"path": "UniWinC/ProjectSettings/XRSettings.asset",
"chars": 158,
"preview": "{\n \"m_SettingKeys\": [\n \"VR Device Disabled\",\n \"VR Device User Alert\"\n ],\n \"m_SettingValues\": [\n "
},
{
"path": "VisualStudio/.gitignore",
"chars": 6217,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n##\n## G"
},
{
"path": "VisualStudio/LibUniWinC/LibUniWinC.vcxproj",
"chars": 10954,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msb"
},
{
"path": "VisualStudio/LibUniWinC/LibUniWinC.vcxproj.filters",
"chars": 1618,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuil"
},
{
"path": "VisualStudio/LibUniWinC/Resource.rc",
"chars": 2289,
"preview": "// Microsoft Visual C++ generated resource script.\r\n//\r\n#include \"resource.h\"\r\n\r\n#define APSTUDIO_READONLY_SYMBOLS\r\n////"
},
{
"path": "VisualStudio/LibUniWinC/dllmain.cpp",
"chars": 415,
"preview": "// dllmain.cpp : DLL アプリケーションのエントリ ポイントを定義します。\n#include \"pch.h\"\n\nBOOL APIENTRY DllMain( HMODULE hModule,\n "
},
{
"path": "VisualStudio/LibUniWinC/framework.h",
"chars": 260,
"preview": "#pragma once\n\n#define WIN32_LEAN_AND_MEAN\t\t// Exclude lesser used parts of Windows headers\n#define STRICT\t\t\t\t\t// Enable"
},
{
"path": "VisualStudio/LibUniWinC/libuniwinc.cpp",
"chars": 48801,
"preview": "// LibUniWinC.cpp\n\n#include \"pch.h\"\n#include \"libuniwinc.h\"\n\n\nstatic HWND hTargetWnd_ = NULL;\nstatic HWND hPanelOwnerWn"
},
{
"path": "VisualStudio/LibUniWinC/libuniwinc.h",
"chars": 5642,
"preview": "#pragma once\n\n#ifdef LIBUNIWINC_EXPORTS\n#define UNIWINC_API __stdcall\n#define UNIWINC_EXPORT extern \"C\" __declspec(dlle"
},
{
"path": "VisualStudio/LibUniWinC/pch.cpp",
"chars": 115,
"preview": "// pch.cpp: プリコンパイル済みヘッダーに対応するソース ファイル\n\n#include \"pch.h\"\n\n// プリコンパイル済みヘッダーを使用している場合、コンパイルを成功させるにはこのソース ファイルが必要です。\n"
},
{
"path": "VisualStudio/LibUniWinC/pch.h",
"chars": 348,
"preview": "// pch.h: プリコンパイル済みヘッダー ファイルです。\n// 次のファイルは、その後のビルドのビルド パフォーマンスを向上させるため 1 回だけコンパイルされます。\n// コード補完や多くのコード参照機能などの IntelliSe"
},
{
"path": "VisualStudio/LibUniWinC/resource.h",
"chars": 363,
"preview": "//{{NO_DEPENDENCIES}}\n// Microsoft Visual C++ generated include file.\n// Used by Resource.rc\n\n// VIuWFNg̎̊l\n// \n#ifdef A"
},
{
"path": "VisualStudio/LibUniWinC.sln",
"chars": 2324,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.3050"
},
{
"path": "VisualStudio/TestLibUniWinC/Additional/WindowInfo.cs",
"chars": 943,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Drawing;\r\nusing System.Linq;\r"
},
{
"path": "VisualStudio/TestLibUniWinC/Additional/WindowList.cs",
"chars": 3760,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Runtime.I"
},
{
"path": "VisualStudio/TestLibUniWinC/App.config",
"chars": 184,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<configuration>\r\n <startup> \r\n \r\n <supportedRuntime version=\"v4.0\" "
},
{
"path": "VisualStudio/TestLibUniWinC/FormMain.Designer.cs",
"chars": 20748,
"preview": "namespace TestLibUniWinC\n{\n partial class FormMain\n {\n /// <summary>\n /// 必要なデザイナー変数です。\n ///"
},
{
"path": "VisualStudio/TestLibUniWinC/FormMain.cs",
"chars": 14044,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing System.Linq;\r\nusing UnityEngine;\r\nusing Kirurobo;\r\nusing System.Drawi"
},
{
"path": "VisualStudio/TestLibUniWinC/FormMain.resx",
"chars": 6016,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n T"
},
{
"path": "VisualStudio/TestLibUniWinC/LowLevel/FilePanel.cs",
"chars": 7486,
"preview": "using AOT;\nusing System;\nusing System.Runtime.InteropServices;\nusing System.Text;\n\nnamespace Kirurobo\n{\n /// <summar"
},
{
"path": "VisualStudio/TestLibUniWinC/LowLevel/UniWinCore.cs",
"chars": 28967,
"preview": "/*\r\n * UniWinCore.cs\r\n * \r\n * Author: Kirurobo http://twitter.com/kirurobo\r\n * License: MIT\r\n */\r\n\r\nusing System;\r\nusin"
},
{
"path": "VisualStudio/TestLibUniWinC/Program.cs",
"chars": 451,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Windows.Forms;\n\nnamespace TestLibUniWinC\n{\n static clas"
},
{
"path": "VisualStudio/TestLibUniWinC/Properties/AssemblyInfo.cs",
"chars": 1090,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// アセンブリに関する一般情報"
},
{
"path": "VisualStudio/TestLibUniWinC/Properties/Resources.Designer.cs",
"chars": 2676,
"preview": "//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n// このコードはツール"
},
{
"path": "VisualStudio/TestLibUniWinC/Properties/Resources.resx",
"chars": 5494,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "VisualStudio/TestLibUniWinC/Properties/Settings.Designer.cs",
"chars": 1040,
"preview": "//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n// このコードはツール"
},
{
"path": "VisualStudio/TestLibUniWinC/Properties/Settings.settings",
"chars": 240,
"preview": "<?xml version='1.0' encoding='utf-8'?>\n<SettingsFile xmlns=\"http://schemas.microsoft.com/VisualStudio/2004/01/settings\""
},
{
"path": "VisualStudio/TestLibUniWinC/TestLibUniWinC.csproj",
"chars": 6535,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbu"
},
{
"path": "VisualStudio/TestLibUniWinC/UnityEmulation/AOT.cs",
"chars": 237,
"preview": "using System;\n\nnamespace AOT\n{\n public class MonoPInvokeCallbackAttribute : Attribute\n {\n private Type typ"
},
{
"path": "VisualStudio/TestLibUniWinC/UnityEmulation/UnityEngine.cs",
"chars": 1717,
"preview": "using System;\r\nusing System.Runtime.InteropServices;\r\n\r\nnamespace UnityEngine\r\n{\r\n public struct Color32\r\n {\r\n "
},
{
"path": "Xcode/.gitignore",
"chars": 2164,
"preview": "# Xcode\n#\n# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore\n\n"
},
{
"path": "Xcode/DebugUniWinC/AppDelegate.swift",
"chars": 327,
"preview": "//\n// AppDelegate.swift\n// DebugUniWinC\n//\n// Created by Kirurobo on 2021/11/06.\n// Copyright © 2021 kirurobo. All r"
},
{
"path": "Xcode/DebugUniWinC/Assets.xcassets/AccentColor.colorset/Contents.json",
"chars": 123,
"preview": "{\n \"colors\" : [\n {\n \"idiom\" : \"universal\"\n }\n ],\n \"info\" : {\n \"author\" : \"xcode\",\n \"version\" : 1\n }"
},
{
"path": "Xcode/DebugUniWinC/Assets.xcassets/AppIcon.appiconset/Contents.json",
"chars": 904,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"mac\",\n \"scale\" : \"1x\",\n \"size\" : \"16x16\"\n },\n {\n \"idiom\" : "
},
{
"path": "Xcode/DebugUniWinC/Assets.xcassets/Contents.json",
"chars": 63,
"preview": "{\n \"info\" : {\n \"author\" : \"xcode\",\n \"version\" : 1\n }\n}\n"
},
{
"path": "Xcode/DebugUniWinC/ContentView.swift",
"chars": 7002,
"preview": "//\n// ContentView.swift\n// DebugUniWinC\n//\n// Created by Kirurobo on 2021/11/05.\n// Copyright © 2021 kirurobo. All r"
},
{
"path": "Xcode/DebugUniWinC/DebugUniWinC.entitlements",
"chars": 312,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Xcode/DebugUniWinC/DebugUniWinCApp.swift",
"chars": 362,
"preview": "//\n// DebugUniWinCApp.swift\n// DebugUniWinC\n//\n// Created by Kirurobo on 2021/11/05.\n// Copyright © 2021 kirurobo. A"
},
{
"path": "Xcode/DebugUniWinC/Preview Content/Preview Assets.xcassets/Contents.json",
"chars": 63,
"preview": "{\n \"info\" : {\n \"author\" : \"xcode\",\n \"version\" : 1\n }\n}\n"
},
{
"path": "Xcode/LibUniWinC/CustomPanelHelper.swift",
"chars": 4823,
"preview": "//\n// CustomPanelHelper.swift\n// LibUniWinC\n//\n// Created by owner on 2021/11/28.\n// Copyright © 2021 kirurobo. All "
},
{
"path": "Xcode/LibUniWinC/LibUniWinC.swift",
"chars": 52432,
"preview": "//\n// Unified Window Controller macOS plugin\n//\n// Author: Kirurobo\n// License: MIT\n//\n// Acknowledgement:\n// This code"
},
{
"path": "Xcode/LibUniWinC/OverlayView.swift",
"chars": 3840,
"preview": "//\n// OverlayView.swift\n// LibUniWinC\n//\n// Created by Kirurobo on 2020/11/28.\n// Copyright © 2020 Kirurobo. All rig"
},
{
"path": "Xcode/LibUniWinC/README.md",
"chars": 179,
"preview": "# Unified Window Controller for macOS\n\n### Author\n[Kirurobo](https://twitter.com/kirurobo)\n\n### License\n[MIT](https://gi"
},
{
"path": "Xcode/LibUniWinC/UnityInterface.swift",
"chars": 7629,
"preview": "//\n// UnityInterface.swift\n//\n// Author: Kirurobo\n// License: MIT\n// Created: 2023/09/19\n// Copyright © 2023 kiruro"
},
{
"path": "docs/reference/html/annotated.html",
"chars": 5262,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/annotated_dup.js",
"chars": 426,
"preview": "var annotated_dup =\n[\n [ \"Kirurobo\", \"namespace_kirurobo.html\", [\n [ \"FilePanel\", \"class_kirurobo_1_1_file_panel"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_bool_property_attribute.html",
"chars": 3816,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_file_panel-members.html",
"chars": 4140,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_file_panel.html",
"chars": 10685,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_file_panel.js",
"chars": 740,
"preview": "var class_kirurobo_1_1_file_panel =\n[\n [ \"Filter\", \"class_kirurobo_1_1_file_panel_1_1_filter.html\", \"class_kirurobo_1"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_file_panel_1_1_filter-members.html",
"chars": 4935,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_file_panel_1_1_filter.html",
"chars": 9544,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_file_panel_1_1_filter.js",
"chars": 157,
"preview": "var class_kirurobo_1_1_file_panel_1_1_filter =\n[\n [ \"Filter\", \"class_kirurobo_1_1_file_panel_1_1_filter.html#a7fbfea0"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_file_panel_1_1_lib_uni_win_c-members.html",
"chars": 4124,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_file_panel_1_1_lib_uni_win_c.html",
"chars": 5522,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_file_panel_1_1_lib_uni_win_c.js",
"chars": 164,
"preview": "var class_kirurobo_1_1_file_panel_1_1_lib_uni_win_c =\n[\n [ \"PanelSettings\", \"struct_kirurobo_1_1_file_panel_1_1_lib_u"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_read_only_attribute.html",
"chars": 3782,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_uni_win_core_1_1_lib_uni_win_c-members.html",
"chars": 18046,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_uni_win_core_1_1_lib_uni_win_c.html",
"chars": 19814,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_uni_window_controller-members.html",
"chars": 13345,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_uni_window_controller.html",
"chars": 27185,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
},
{
"path": "docs/reference/html/class_kirurobo_1_1_uni_window_controller.js",
"chars": 4804,
"preview": "var class_kirurobo_1_1_uni_window_controller =\n[\n [ \"HitTestType\", \"class_kirurobo_1_1_uni_window_controller.html#a9e"
}
]
// ... and 42 more files (download for full content)
About this extraction
This page contains the full source code of the kirurobo/UniWindowController GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 242 files (1.7 MB), approximately 612.9k tokens, and a symbol index with 613 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.