From fb41a9a486fb7e6d17176f57b33eae8347d77e1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B5=B7?= <1464576565@qq.com> Date: Wed, 6 Aug 2025 13:28:34 +0800 Subject: [PATCH] modify --- Runtime/AlicizaX.Entry.Runtime.asmdef | 40 +++++++++++++++++++++++++++ Runtime/GameApp.Audio.cs | 5 +++- Runtime/GameApp.Event.cs | 4 ++- Runtime/GameApp.Fsm.cs | 6 +++- Runtime/GameApp.Localization.cs | 4 ++- Runtime/GameApp.Resource.cs | 5 +++- Runtime/GameApp.Scene.cs | 5 +++- Runtime/GameApp.Timer.cs | 5 +++- Runtime/GameApp.UI.cs | 5 +++- Runtime/GameAppStaticMemberReset.cs | 22 +++++++++++++++ 10 files changed, 93 insertions(+), 8 deletions(-) diff --git a/Runtime/AlicizaX.Entry.Runtime.asmdef b/Runtime/AlicizaX.Entry.Runtime.asmdef index b19c97f..42b0400 100644 --- a/Runtime/AlicizaX.Entry.Runtime.asmdef +++ b/Runtime/AlicizaX.Entry.Runtime.asmdef @@ -27,6 +27,46 @@ "name": "com.alicizax.unity.network", "expression": "", "define": "ALICIZAX_NETWORK" + }, + { + "name": "com.alicizax.unity.event", + "expression": "", + "define": "ALICIZAX_EVENT_SUPPORT" + }, + { + "name": "com.alicizax.unity.audio", + "expression": "", + "define": "ALICIZAX_AUDIO_SUPPORT" + }, + { + "name": "com.alicizax.unity.fsm", + "expression": "", + "define": "ALICIZAX_FSM_SUPPORT" + }, + { + "name": "com.alicizax.unity.localization", + "expression": "", + "define": "ALICIZAX_LOCALIZATION_SUPPORT" + }, + { + "name": "com.alicizax.unity.resource", + "expression": "", + "define": "ALICIZAX_RESOURCE_SUPPORT" + }, + { + "name": "com.alicizax.unity.scene", + "expression": "", + "define": "ALICIZAX_SCENE_SUPPORT" + }, + { + "name": "com.alicizax.unity.timer", + "expression": "", + "define": "ALICIZAX_TIMER_SUPPORT" + }, + { + "name": "com.alicizax.unity.ui", + "expression": "", + "define": "ALICIZAX_UI_SUPPORT" } ], "noEngineReferences": false diff --git a/Runtime/GameApp.Audio.cs b/Runtime/GameApp.Audio.cs index 5489a6a..c9a410e 100644 --- a/Runtime/GameApp.Audio.cs +++ b/Runtime/GameApp.Audio.cs @@ -1,4 +1,5 @@ -using AlicizaX; +#if ALICIZAX_AUDIO_SUPPORT +using AlicizaX; using AlicizaX.Audio.Runtime; public static partial class GameApp @@ -21,3 +22,5 @@ public static partial class GameApp internal static IAudioModule _audio; } + +#endif diff --git a/Runtime/GameApp.Event.cs b/Runtime/GameApp.Event.cs index 49c5473..4dfdbc5 100644 --- a/Runtime/GameApp.Event.cs +++ b/Runtime/GameApp.Event.cs @@ -1,4 +1,4 @@ - +#if ALICIZAX_EVENT_SUPPORT using AlicizaX.Event.Runtime; using AlicizaX; @@ -22,3 +22,5 @@ public static partial class GameApp internal static IEventModule _event; } + +#endif diff --git a/Runtime/GameApp.Fsm.cs b/Runtime/GameApp.Fsm.cs index b18194d..590acb8 100644 --- a/Runtime/GameApp.Fsm.cs +++ b/Runtime/GameApp.Fsm.cs @@ -1,4 +1,7 @@ -using AlicizaX; + #if ALICIZAX_FSM_SUPPORT + + +using AlicizaX; using AlicizaX.Fsm.Runtime; public static partial class GameApp @@ -21,3 +24,4 @@ public static partial class GameApp internal static IFsmModule _fsm; } +#endif diff --git a/Runtime/GameApp.Localization.cs b/Runtime/GameApp.Localization.cs index f21866b..d9c83fc 100644 --- a/Runtime/GameApp.Localization.cs +++ b/Runtime/GameApp.Localization.cs @@ -1,4 +1,5 @@ -using AlicizaX.Localization.Runtime; +#if ALICIZAX_LOCALIZATION_SUPPORT +using AlicizaX.Localization.Runtime; using AlicizaX; public static partial class GameApp @@ -21,3 +22,4 @@ public static partial class GameApp internal static ILocalizationModule _localization; } +#endif diff --git a/Runtime/GameApp.Resource.cs b/Runtime/GameApp.Resource.cs index eef1990..dac2b84 100644 --- a/Runtime/GameApp.Resource.cs +++ b/Runtime/GameApp.Resource.cs @@ -1,4 +1,5 @@ - +#if ALICIZAX_RESOURCE_SUPPORT + using AlicizaX.Resource.Runtime; using AlicizaX; @@ -22,3 +23,5 @@ public static partial class GameApp internal static IResourceModule _resource; } + +#endif diff --git a/Runtime/GameApp.Scene.cs b/Runtime/GameApp.Scene.cs index ea8a287..1ec7a0f 100644 --- a/Runtime/GameApp.Scene.cs +++ b/Runtime/GameApp.Scene.cs @@ -1,4 +1,5 @@ -using AlicizaX; +#if ALICIZAX_SCENE_SUPPORT +using AlicizaX; using AlicizaX.Scene.Runtime; public static partial class GameApp @@ -22,3 +23,5 @@ public static partial class GameApp internal static ISceneModule _scene; } + +#endif diff --git a/Runtime/GameApp.Timer.cs b/Runtime/GameApp.Timer.cs index 256fbdf..f584403 100644 --- a/Runtime/GameApp.Timer.cs +++ b/Runtime/GameApp.Timer.cs @@ -1,4 +1,5 @@ -using AlicizaX; +#if ALICIZAX_TIMER_SUPPORT +using AlicizaX; using AlicizaX.Timer.Runtime; public static partial class GameApp @@ -21,3 +22,5 @@ public static partial class GameApp internal static ITimerModule _timer; } + +#endif diff --git a/Runtime/GameApp.UI.cs b/Runtime/GameApp.UI.cs index f051607..c1cdb58 100644 --- a/Runtime/GameApp.UI.cs +++ b/Runtime/GameApp.UI.cs @@ -1,4 +1,5 @@ -using AlicizaX; +#if ALICIZAX_UI_SUPPORT +using AlicizaX; using AlicizaX.UI.Runtime; public static partial class GameApp @@ -21,3 +22,5 @@ public static partial class GameApp internal static IUIModule _ui; } + +#endif diff --git a/Runtime/GameAppStaticMemberReset.cs b/Runtime/GameAppStaticMemberReset.cs index d034471..b143628 100644 --- a/Runtime/GameAppStaticMemberReset.cs +++ b/Runtime/GameAppStaticMemberReset.cs @@ -19,18 +19,40 @@ internal static class GameAppStaticMemberReset private static void ResetAllEventContainers() { GameApp._base = null; +#if ALICIZAX_AUDIO_SUPPORT GameApp._audio = null; +#endif + +#if ALICIZAX_EVENT_SUPPORT GameApp._event = null; +#endif +#if ALICIZAX_FSM_SUPPORT GameApp._fsm = null; +#endif +#if ALICIZAX_LOCALIZATION_SUPPORT GameApp._localization = null; +#endif + #if ALICIZAX_NETWORK GameApp._network = null; #endif GameApp._objectPool = null; +#if ALICIZAX_RESOURCE_SUPPORT GameApp._resource = null; +#endif + +#if ALICIZAX_SCENE_SUPPORT GameApp._scene = null; +#endif + +#if ALICIZAX_TIMER_SUPPORT GameApp._timer = null; +#endif + +#if ALICIZAX_UI_SUPPORT GameApp._ui = null; +#endif + } }