From 1642e93d06b858540dcf5c379683b33d74948108 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Thu, 9 Jan 2025 10:22:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UITextTip.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Assets/Scripts/UI/UITextTip.cs b/Assets/Scripts/UI/UITextTip.cs index d09da503..154c5dec 100644 --- a/Assets/Scripts/UI/UITextTip.cs +++ b/Assets/Scripts/UI/UITextTip.cs @@ -4,6 +4,8 @@ using QFramework; using System.Collections.Generic; using TMPro; using System.Text.RegularExpressions; +using static OperationController; +using System; namespace QFramework.Example { @@ -20,10 +22,16 @@ namespace QFramework.Example { mData = uiData as UITextTipData ?? new UITextTipData(); + TypeEventSystem.Global.Register(OnStepChanged).UnRegisterWhenGameObjectDestroyed(this); TypeEventSystem.Global.Register((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); } + private void OnStepChanged(StepStatusOnChange change) + { + Hide(); + } + protected override void OnOpen(IUIData uiData = null) { mData = uiData as UITextTipData ?? new UITextTipData();