From 13af06d80af52e8f0f5487a892024f09a0ff76de Mon Sep 17 00:00:00 2001 From: geondo55 <102933884+geondo55@users.noreply.github.com> Date: Tue, 15 Jul 2025 14:15:54 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EC=B0=BD=EB=AA=A8=EB=93=9C=20=EC=8B=9C=20?= =?UTF-8?q?=EC=B5=9C=EC=86=8C=ED=99=94,=20=EC=B5=9C=EB=8C=80=ED=99=94,=20?= =?UTF-8?q?=EB=8B=AB=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20=EB=B9=84=ED=99=9C?= =?UTF-8?q?=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/0.30.0.unity | 22 +++++++++++++- .../Studio/UI/Panel/Panel_StudioTopBar.cs | 11 ++++++- .../Scripts/Studio/Utility/CheckScreenMode.cs | 30 +++++++++++++++++++ .../Studio/Utility/CheckScreenMode.cs.meta | 2 ++ 4 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 Assets/Scripts/Studio/Utility/CheckScreenMode.cs create mode 100644 Assets/Scripts/Studio/Utility/CheckScreenMode.cs.meta diff --git a/Assets/Scenes/0.30.0.unity b/Assets/Scenes/0.30.0.unity index c3b4fb69..de25e811 100644 --- a/Assets/Scenes/0.30.0.unity +++ b/Assets/Scenes/0.30.0.unity @@ -1612,13 +1612,33 @@ PrefabInstance: m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] - m_AddedComponents: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4849584302742208544, guid: 13ace7584c1d4514cb2218354647e355, type: 3} + insertIndex: -1 + addedObject: {fileID: 432313350} m_SourcePrefab: {fileID: 100100000, guid: 13ace7584c1d4514cb2218354647e355, type: 3} --- !u!224 &416036583 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 7844719208258716390, guid: 96b73e9674fb61c489cee99ad24c044c, type: 3} m_PrefabInstance: {fileID: 455884375451432191} m_PrefabAsset: {fileID: 0} +--- !u!1 &432313348 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4849584302742208544, guid: 13ace7584c1d4514cb2218354647e355, type: 3} + m_PrefabInstance: {fileID: 396217241} + m_PrefabAsset: {fileID: 0} +--- !u!114 &432313350 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 432313348} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d6cdc4bdaa2849b469fdc34f85e08800, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &445006263 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Studio/UI/Panel/Panel_StudioTopBar.cs b/Assets/Scripts/Studio/UI/Panel/Panel_StudioTopBar.cs index 74377be5..9356cbdf 100644 --- a/Assets/Scripts/Studio/UI/Panel/Panel_StudioTopBar.cs +++ b/Assets/Scripts/Studio/UI/Panel/Panel_StudioTopBar.cs @@ -49,8 +49,10 @@ namespace Studio.UI public event Action onClickBuild; public event Action onClickRun; - + /*Window*/ + public Button Button_Minimize; + public Button Button_Maximize; public Button Button_Close; public event Action onClickClose; @@ -90,6 +92,13 @@ namespace Studio.UI Button_Close.onClick.AddListener(OnClickClose); } + public void ToggleWindowButton(bool isOn) + { + Button_Minimize.gameObject.SetActive(isOn); + Button_Maximize.gameObject.SetActive(isOn); + Button_Close.gameObject.SetActive(isOn); + } + private void OnClickLogo() { Debug.Log("On TopMenu Click Logo"); diff --git a/Assets/Scripts/Studio/Utility/CheckScreenMode.cs b/Assets/Scripts/Studio/Utility/CheckScreenMode.cs new file mode 100644 index 00000000..0cde725a --- /dev/null +++ b/Assets/Scripts/Studio/Utility/CheckScreenMode.cs @@ -0,0 +1,30 @@ +using Studio.Manage; +using Studio.UI; +using UnityEngine; + +namespace Studio +{ + public class CheckScreenMode : MonoBehaviour + { + Panel_StudioTopBar panel_studioTopbar; + + public override void AfterAwake() + { + panel_studioTopbar = CanvasManager.instance.GetCanvas().panel_studiotopbar; + ToggleScreenMode(); + } + + void Update() + { + if (Input.GetKeyDown(KeyCode.Return) && Input.GetKey(KeyCode.LeftAlt)) + { + ToggleScreenMode(); + } + } + + void ToggleScreenMode() + { + panel_studioTopbar.ToggleWindowButton(Screen.fullScreenMode == FullScreenMode.FullScreenWindow); + } + } +} diff --git a/Assets/Scripts/Studio/Utility/CheckScreenMode.cs.meta b/Assets/Scripts/Studio/Utility/CheckScreenMode.cs.meta new file mode 100644 index 00000000..f448b72a --- /dev/null +++ b/Assets/Scripts/Studio/Utility/CheckScreenMode.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: d6cdc4bdaa2849b469fdc34f85e08800 \ No newline at end of file -- 2.48.1.windows.1 From 44b20275e98eaa3f1bdc7c0e4e238357acade135 Mon Sep 17 00:00:00 2001 From: geondo55 <102933884+geondo55@users.noreply.github.com> Date: Tue, 15 Jul 2025 15:42:06 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Prefabs/AAA/Panel_StudioTopbar.prefab | 97 +++++++++++++++---- .../Scripts/Studio/Utility/CheckScreenMode.cs | 7 +- 2 files changed, 82 insertions(+), 22 deletions(-) diff --git a/Assets/Prefabs/AAA/Panel_StudioTopbar.prefab b/Assets/Prefabs/AAA/Panel_StudioTopbar.prefab index 8f2a2351..26e83494 100644 --- a/Assets/Prefabs/AAA/Panel_StudioTopbar.prefab +++ b/Assets/Prefabs/AAA/Panel_StudioTopbar.prefab @@ -1301,6 +1301,8 @@ MonoBehaviour: Button_AssetSetting: {fileID: 0} Button_Build: {fileID: 0} Button_Run: {fileID: 0} + Button_Minimize: {fileID: 0} + Button_Maximize: {fileID: 0} Button_Close: {fileID: 0} Button_LanguageSetting: {fileID: 0} Text_Language: {fileID: 0} @@ -1337,9 +1339,9 @@ RectTransform: - {fileID: 6439475914521511574} m_Father: {fileID: 6105994354646297837} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 150, y: -37.5} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 50, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3307776113491590244 @@ -2078,10 +2080,10 @@ RectTransform: - {fileID: 6894583408433458914} m_Father: {fileID: 6105994354646297837} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 50, y: -37.5} - m_SizeDelta: {x: 50, y: 50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 60, y: 60} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4915864242522557518 CanvasRenderer: @@ -2571,9 +2573,9 @@ RectTransform: - {fileID: 7054109033963218553} m_Father: {fileID: 6105994354646297837} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 100, y: -37.5} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 50, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3095001773842864069 @@ -3556,10 +3558,10 @@ RectTransform: - {fileID: 6290649851210927995} m_Father: {fileID: 6105994354646297837} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: -7.5903473, y: -37.5} - m_SizeDelta: {x: 50, y: 50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 60, y: 60} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1926263514506647527 CanvasRenderer: @@ -6328,6 +6330,9 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 6105994354646297837} + - component: {fileID: 7151672390494194749} + - component: {fileID: 6179663858466594010} + - component: {fileID: 3165364495730236704} m_Layer: 5 m_Name: ControlBox m_TagString: Untagged @@ -6356,9 +6361,61 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -115, y: 0} - m_SizeDelta: {x: 230, y: 0} - m_Pivot: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 1, y: 0.5} +--- !u!114 &7151672390494194749 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4849584302742208544} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d6cdc4bdaa2849b469fdc34f85e08800, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &6179663858466594010 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4849584302742208544} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 4 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &3165364495730236704 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4849584302742208544} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 2 + m_VerticalFit: 2 --- !u!1 &4935520382785236192 GameObject: m_ObjectHideFlags: 0 @@ -6938,9 +6995,9 @@ RectTransform: - {fileID: 3196972812475121927} m_Father: {fileID: 6105994354646297837} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 200, y: -37.5} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 50, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4143904688327696818 diff --git a/Assets/Scripts/Studio/Utility/CheckScreenMode.cs b/Assets/Scripts/Studio/Utility/CheckScreenMode.cs index 0cde725a..85a8dc30 100644 --- a/Assets/Scripts/Studio/Utility/CheckScreenMode.cs +++ b/Assets/Scripts/Studio/Utility/CheckScreenMode.cs @@ -1,5 +1,6 @@ using Studio.Manage; using Studio.UI; +using TMPro; using UnityEngine; namespace Studio @@ -7,6 +8,7 @@ namespace Studio public class CheckScreenMode : MonoBehaviour { Panel_StudioTopBar panel_studioTopbar; + private FullScreenMode curScreenMode; public override void AfterAwake() { @@ -16,15 +18,16 @@ namespace Studio void Update() { - if (Input.GetKeyDown(KeyCode.Return) && Input.GetKey(KeyCode.LeftAlt)) + if (curScreenMode != Screen.fullScreenMode) { + curScreenMode = Screen.fullScreenMode; ToggleScreenMode(); } } void ToggleScreenMode() { - panel_studioTopbar.ToggleWindowButton(Screen.fullScreenMode == FullScreenMode.FullScreenWindow); + panel_studioTopbar.ToggleWindowButton(curScreenMode != FullScreenMode.Windowed); } } } -- 2.48.1.windows.1