Skip to content

Commit

Permalink
Merge pull request #78 from kirurobo/dev_win
Browse files Browse the repository at this point in the history
v0.9.4
  • Loading branch information
kirurobo authored Feb 6, 2025
2 parents 9cdb3b3 + 44f123f commit b7f8fc1
Show file tree
Hide file tree
Showing 18 changed files with 350 additions and 275 deletions.
8 changes: 8 additions & 0 deletions UniWinC/Assets/Kirurobo/UniWindowController/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ How to write the changelog.
https://keepachangelog.com/ja/1.0.0/
--->

## [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
Expand Down
5 changes: 3 additions & 2 deletions UniWinC/Assets/Kirurobo/UniWindowController/README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ B. UnityPackage を利用する手順
## Unity プロジェクトでの利用
1. Runtime/Prefabs にある `UniWindowController` プレハブをシーンに追加
2. そこで配置された `UniWindowController` をインスペクターで確認
- Player Settings を適切に直す(緑のボタンでまとめて設定が変更されます)
- `IsTransparent` 等、設定をお好みに合わせる
- Player Settings を適切に直す(緑のボタンでまとめて設定が変更されます)
- `IsTransparent` 等、設定をお好みに合わせる
3. 左ドラッグでウィンドウ自体を動かしたい場合、 Runtime/Prefabs の `DragMoveCanvas` プレハブも追加
- 動作には EventSystem が必要です。もしシーンに無ければ UI → Event System を追加してください。
4. PC / Mac スタンドアローンでビルドする
5. ビルドしたものを起動

Expand Down
1 change: 1 addition & 0 deletions UniWinC/Assets/Kirurobo/UniWindowController/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ B. Using an UnityPackage
- 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>23E224</string>
<string>24C101</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.9.3</string>
<string>0.9.4</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
Expand All @@ -27,19 +27,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string></string>
<string>24C94</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>14.4</string>
<string>15.2</string>
<key>DTSDKBuild</key>
<string>23E208</string>
<string>24C94</string>
<key>DTSDKName</key>
<string>macosx14.4</string>
<string>macosx15.2</string>
<key>DTXcode</key>
<string>1530</string>
<string>1620</string>
<key>DTXcodeBuild</key>
<string>15E204a</string>
<string>16C5032a</string>
<key>LSMinimumSystemVersion</key>
<string>11.0</string>
<key>NSHumanReadableCopyright</key>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,13 @@ void SetCameraBackground(bool transparent)
// 透過するならカメラの背景を透明色に変更
if (transparent)
{
// 透明化される前ならば、現時点のカメラ情報を記憶
if (!isTransparent)
{
originalCameraClearFlags = currentCamera.clearFlags;
originalCameraBackground = currentCamera.backgroundColor;
}

currentCamera.clearFlags = CameraClearFlags.SolidColor;
if (transparentType == TransparentType.ColorKey)
{
Expand All @@ -865,8 +872,8 @@ void SetCameraBackground(bool transparent)
/// <param name="transparent"></param>
private void SetTransparent(bool transparent)
{
_isTransparent = transparent;
SetCameraBackground(transparent);
_isTransparent = transparent;
#if !UNITY_EDITOR
if (_uniWinCore != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ private void Awake()
SceneManager.sceneLoaded += SceneManager_sceneLoaded;
}

/// <summary>
/// シーンロード時にメインカメラを記憶
/// </summary>
/// <param name="arg0"></param>
/// <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>
/// <summary>
/// 指定の名前のシーンを開く
/// </summary>
/// <param name="name">シーン名</param>
public void LoadScene(string name)
{
Expand All @@ -58,16 +58,16 @@ public void LoadScene(string name)
SceneManager.LoadScene(name);
}

/// <summary>
/// 終了
/// <summary>
/// 終了
/// </summary>
public void Quit()
{
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
#else
Application.Quit();
#endif
public void Quit()
{
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
#else
Application.Quit();
#endif
}
}
}
2 changes: 1 addition & 1 deletion UniWinC/Assets/Kirurobo/UniWindowController/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.kirurobo.uniwinc",
"version": "0.9.3",
"version": "0.9.4",
"displayName": "UniWindowController",
"description": "Unified window controller for Mac and Windows",
"unity": "2020.3",
Expand Down
98 changes: 2 additions & 96 deletions UniWinC/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ PlayerSettings:
vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1
loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0
bundleVersion: 0.9.2
bundleVersion: 0.9.4
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down Expand Up @@ -284,99 +282,7 @@ PlayerSettings:
AndroidValidateAppBundleSize: 1
AndroidAppBundleSizeToValidate: 150
m_BuildTargetIcons: []
m_BuildTargetPlatformIcons:
- m_BuildTarget: Android
m_Icons:
- m_Textures: []
m_Width: 432
m_Height: 432
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 324
m_Height: 324
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 216
m_Height: 216
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 162
m_Height: 162
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 108
m_Height: 108
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 81
m_Height: 81
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 192
m_Height: 192
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 144
m_Height: 144
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 96
m_Height: 96
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 72
m_Height: 72
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 48
m_Height: 48
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 36
m_Height: 36
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 192
m_Height: 192
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 144
m_Height: 144
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 96
m_Height: 96
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 72
m_Height: 72
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 48
m_Height: 48
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 36
m_Height: 36
m_Kind: 0
m_SubKind:
m_BuildTargetPlatformIcons: []
m_BuildTargetBatching:
- m_BuildTarget: Standalone
m_StaticBatching: 1
Expand Down
4 changes: 2 additions & 2 deletions UniWinC/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m_EditorVersion: 2022.3.39f1
m_EditorVersionWithRevision: 2022.3.39f1 (4e1b0f82c39a)
m_EditorVersion: 2022.3.26f1
m_EditorVersionWithRevision: 2022.3.26f1 (ec6cd8118806)
Loading

0 comments on commit b7f8fc1

Please sign in to comment.