void OnEnable()
        {
            Instance = this;
            EditorApplication.playModeStateChanged += HandlePlayMode;
            EditorApplication.update += OnEditorUpdate;

            Settings = (DevelopmentSettingsAsset)AssetDatabase.LoadAssetAtPath("Assets/Resources/Editor/DeveloperSettings.asset", typeof(DevelopmentSettingsAsset));
            if (Settings == null)
            {
                Settings = (DevelopmentSettingsAsset)CreateInstance(typeof(DevelopmentSettingsAsset));
                Debug.Log("Initialized new developer settings");
                Settings.VersionOverride = Application.version;
                AssetDatabase.CreateAsset(Settings, "Assets/Resources/Editor/DeveloperSettings.asset");
            }

            if (Settings.developerSimulationJson != null)
            {
                DeveloperSimulation = JsonConvert.DeserializeObject <SimulationData>(Settings.developerSimulationJson);
            }

            if (DeveloperSimulation == null)
            {
                DeveloperSimulation = new SimulationData()
                {
                    Name      = "DeveloperSettings",
                    TimeOfDay = DateTime.Now,
                };
            }

            Refresh();
        }
        void OnEnable()
        {
            Instance = this;
            EditorApplication.playModeStateChanged    += HandlePlayMode;
            AssemblyReloadEvents.beforeAssemblyReload += OnBeforeAssemblyReload;
            EditorApplication.update += OnEditorUpdate;

            Settings = (DevelopmentSettingsAsset)AssetDatabase.LoadAssetAtPath("Assets/Resources/Editor/DeveloperSettings.asset", typeof(DevelopmentSettingsAsset));
            if (Settings == null)
            {
                Settings = (DevelopmentSettingsAsset)CreateInstance(typeof(DevelopmentSettingsAsset));
                Debug.Log("Initialized new developer settings");
                AssetDatabase.CreateAsset(Settings, "Assets/Resources/Editor/DeveloperSettings.asset");
            }

            if (Settings.developerSimulationJson != null)
            {
                DeveloperSimulation = JsonConvert.DeserializeObject <SimulationData>(Settings.developerSimulationJson);
            }

            if (DeveloperSimulation == null)
            {
                DeveloperSimulation = new SimulationData()
                {
                    Name      = "DeveloperSettings",
                    TimeOfDay = DateTime.Now,
                    Cluster   = new ClusterData()
                    {
                        Name      = "DeveloperSettingsDummy",
                        Instances = new[]
                        {
                            new InstanceData
                            {
                                HostName   = "dummy.developer.settings",
                                Ip         = new [] { "127.0.0.1" },
                                MacAddress = "00:00:00:00:00:00"
                            }
                        }
                    }
                };
            }

            Refresh();
        }