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();