From 94d0a53e70c03db69d5c0b12421850811d8d6489 Mon Sep 17 00:00:00 2001 From: "DESKTOP-B25GA9E\\W35" <1733709035@qq.com> Date: Tue, 21 Mar 2023 11:31:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4Unity=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=EF=BC=8C=E4=BD=9C=E4=B8=BA=E7=8B=AC=E7=AB=8B=E5=89=AF=E6=9C=AC?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/MsgTransmitTools/src/QFrameCopy.cs | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/Assets/MsgTransmitTools/src/QFrameCopy.cs b/Assets/MsgTransmitTools/src/QFrameCopy.cs index 3e91a5a..d7f2761 100644 --- a/Assets/MsgTransmitTools/src/QFrameCopy.cs +++ b/Assets/MsgTransmitTools/src/QFrameCopy.cs @@ -22,7 +22,6 @@ using System; using System.Collections.Generic; -using UnityEngine; namespace QFrameworkCP { @@ -474,7 +473,7 @@ namespace QFrameworkCP } } - public class UnRegisterOnDestroyTrigger : MonoBehaviour + public class UnRegisterOnDestroyTrigger { private readonly HashSet mUnRegisters = new HashSet(); @@ -499,23 +498,6 @@ namespace QFrameworkCP } } - public static class UnRegisterExtension - { - public static IUnRegister UnRegisterWhenGameObjectDestroyed(this IUnRegister unRegister, GameObject gameObject) - { - var trigger = gameObject.GetComponent(); - - if (!trigger) - { - trigger = gameObject.AddComponent(); - } - - trigger.AddUnRegister(unRegister); - - return unRegister; - } - } - public class TypeEventSystem { private readonly EasyEvents mEvents = new EasyEvents();