From 2f3ba8bb5e8240accd89173535e3bc9963a43888 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Wed, 26 Mar 2025 14:26:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9UI=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Art/UIPrefab/UIBody3D.prefab | 12 ++++++------ Assets/Scripts/UI/UIBody3D.cs | 6 ++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Assets/Art/UIPrefab/UIBody3D.prefab b/Assets/Art/UIPrefab/UIBody3D.prefab index 6f39b780..71164454 100644 --- a/Assets/Art/UIPrefab/UIBody3D.prefab +++ b/Assets/Art/UIPrefab/UIBody3D.prefab @@ -109,11 +109,11 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 6817573057800099586} - m_Father: {fileID: 1062102287437619772} + m_Father: {fileID: 755010573038241708} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 32.200077, y: -701.89996} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 52, y: 52} m_Pivot: {x: 0.00000008940697, y: 1} --- !u!222 &4845750367835213768 @@ -2642,12 +2642,13 @@ RectTransform: - {fileID: 2159994204788984713} - {fileID: 7255839356631455979} - {fileID: 318507419745050835} + - {fileID: 4882082439993323191} m_Father: {fileID: 1062102287437619772} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} m_AnchoredPosition: {x: 78.2, y: -218.5} - m_SizeDelta: {x: 110, y: 495.028} + m_SizeDelta: {x: 110, y: 478} m_Pivot: {x: 0.49999964, y: 0.0000000121071935} --- !u!222 &4610696393774473950 CanvasRenderer: @@ -5990,7 +5991,6 @@ RectTransform: m_Children: - {fileID: 755010573038241708} - {fileID: 2274076329559986735} - - {fileID: 4882082439993323191} - {fileID: 7012541589931891369} - {fileID: 5813253783596824543} - {fileID: 7288756047650164559} diff --git a/Assets/Scripts/UI/UIBody3D.cs b/Assets/Scripts/UI/UIBody3D.cs index 3b76c267..3e3c4b45 100644 --- a/Assets/Scripts/UI/UIBody3D.cs +++ b/Assets/Scripts/UI/UIBody3D.cs @@ -123,14 +123,16 @@ namespace QFramework.Example DOTween.To(() => LeftBg.rectTransform.sizeDelta.y, (value) => { LeftBg.rectTransform.sizeDelta = new Vector2(LeftBg.rectTransform.sizeDelta.x, value); }, 52f, 0.5f).OnComplete(() => { - LeftBg.transform.GetChild(0).gameObject.SetActive(false); + //LeftBg.transform.GetChild(0).gameObject.SetActive(false); + HideAll.transform.SetAsFirstSibling(); }); RightContent.GetComponent().DORestart(); HideAll.transform.Find("Label").GetComponent().text = "ʾ"; } else { - LeftBg.transform.Find("ResetBtn").gameObject.SetActive(true); + + HideAll.transform.SetAsLastSibling(); DOTween.To(() => LeftBg.rectTransform.sizeDelta.y, (value) => { LeftBg.rectTransform.sizeDelta = new Vector2(LeftBg.rectTransform.sizeDelta.x, value); }, leftBgOriginalY, 0.5f).OnComplete(() => {