37 lines
904 B
C#
37 lines
904 B
C#
#if UNITY_EDITOR
|
|
using System.Reflection;
|
|
using AlicizaX.EventKit;
|
|
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;
|
|
GameApp._audio = null;
|
|
GameApp._event = null;
|
|
GameApp._fsm = null;
|
|
GameApp._localization = null;
|
|
GameApp._network = null;
|
|
GameApp._objectPool = null;
|
|
GameApp._procedure = null;
|
|
GameApp._resource = null;
|
|
GameApp._scene = null;
|
|
GameApp._timer = null;
|
|
GameApp._ui = null;
|
|
}
|
|
}
|
|
|
|
#endif
|