2025-04-02 19:28:28 +08:00
|
|
|
#if UNITY_EDITOR
|
|
|
|
using UnityEditor;
|
|
|
|
|
|
|
|
internal static class GameAppStaticMemberReset
|
|
|
|
{
|
|
|
|
static GameAppStaticMemberReset()
|
|
|
|
{
|
|
|
|
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
|
|
|
|
}
|
|
|
|
|
|
|
|
private static void OnPlayModeStateChanged(PlayModeStateChange state)
|
|
|
|
{
|
|
|
|
if (state == PlayModeStateChange.ExitingPlayMode)
|
|
|
|
ResetAllEventContainers();
|
|
|
|
}
|
|
|
|
|
|
|
|
private static void ResetAllEventContainers()
|
|
|
|
{
|
|
|
|
GameApp._base = null;
|
2025-08-06 13:28:34 +08:00
|
|
|
#if ALICIZAX_AUDIO_SUPPORT
|
2025-04-02 19:28:28 +08:00
|
|
|
GameApp._audio = null;
|
2025-08-06 13:28:34 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ALICIZAX_EVENT_SUPPORT
|
2025-04-02 19:28:28 +08:00
|
|
|
GameApp._event = null;
|
2025-08-06 13:28:34 +08:00
|
|
|
#endif
|
|
|
|
#if ALICIZAX_FSM_SUPPORT
|
2025-04-02 19:28:28 +08:00
|
|
|
GameApp._fsm = null;
|
2025-08-06 13:28:34 +08:00
|
|
|
#endif
|
|
|
|
#if ALICIZAX_LOCALIZATION_SUPPORT
|
2025-04-02 19:28:28 +08:00
|
|
|
GameApp._localization = null;
|
2025-08-06 13:28:34 +08:00
|
|
|
#endif
|
|
|
|
|
2025-07-14 17:03:29 +08:00
|
|
|
#if ALICIZAX_NETWORK
|
2025-04-02 19:28:28 +08:00
|
|
|
GameApp._network = null;
|
2025-07-14 17:03:29 +08:00
|
|
|
#endif
|
2025-04-02 19:28:28 +08:00
|
|
|
GameApp._objectPool = null;
|
2025-08-06 13:28:34 +08:00
|
|
|
#if ALICIZAX_RESOURCE_SUPPORT
|
2025-04-02 19:28:28 +08:00
|
|
|
GameApp._resource = null;
|
2025-08-06 13:28:34 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ALICIZAX_SCENE_SUPPORT
|
2025-04-02 19:28:28 +08:00
|
|
|
GameApp._scene = null;
|
2025-08-06 13:28:34 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ALICIZAX_TIMER_SUPPORT
|
2025-04-02 19:28:28 +08:00
|
|
|
GameApp._timer = null;
|
2025-08-06 13:28:34 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ALICIZAX_UI_SUPPORT
|
2025-04-02 19:28:28 +08:00
|
|
|
GameApp._ui = null;
|
2025-08-06 13:28:34 +08:00
|
|
|
#endif
|
|
|
|
|
2025-04-02 19:28:28 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|