From 0429bc87391e77b488e9bd92f3db6dbacfe0d6d4 Mon Sep 17 00:00:00 2001 From: Lihao7788 <2470304407@qq.com> Date: Wed, 23 Apr 2025 10:33:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A8=A1=E5=9D=97=E9=80=80?= =?UTF-8?q?=E5=87=BA=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UILongPicture/UIChangeOperation.cs | 11 +++++++++++ Data/Xml/01_ShiYanLiLunRenZhi.xml | 3 +++ 2 files changed, 14 insertions(+) diff --git a/Assets/Scripts/UILongPicture/UIChangeOperation.cs b/Assets/Scripts/UILongPicture/UIChangeOperation.cs index 95ef2a45..dde06e65 100644 --- a/Assets/Scripts/UILongPicture/UIChangeOperation.cs +++ b/Assets/Scripts/UILongPicture/UIChangeOperation.cs @@ -2,6 +2,7 @@ using UnityEngine; using UnityEngine.UI; using QFramework; using TMPro; +using static OperationController; namespace QFramework.Example { @@ -14,6 +15,8 @@ namespace QFramework.Example Button curBtn; protected override void OnInit(IUIData uiData = null) { + TypeEventSystem.Global.Register(OnModuleQuit).UnRegisterWhenGameObjectDestroyed(gameObject); + mData = uiData as UIChangeOperationData ?? new UIChangeOperationData(); // please add init code here for (int i = 0; i < Content.childCount; i++) @@ -48,10 +51,18 @@ namespace QFramework.Example protected override void OnHide() { + + + } protected override void OnClose() { + + } + public void OnModuleQuit(OnModuleQuit arg) + { + Hide(); } } } diff --git a/Data/Xml/01_ShiYanLiLunRenZhi.xml b/Data/Xml/01_ShiYanLiLunRenZhi.xml index dd6ec1b1..af354031 100644 --- a/Data/Xml/01_ShiYanLiLunRenZhi.xml +++ b/Data/Xml/01_ShiYanLiLunRenZhi.xml @@ -25,6 +25,9 @@ + + +