static void Update() { EditorApplication.update -= Update; if (!EditorApplication.isPlayingOrWillChangePlaymode) { Preferences.ShowOption show = Preferences.ShowOption.Never; if (!EditorPrefs.HasKey(Preferences.PrefStartUp)) { show = Preferences.ShowOption.Always; EditorPrefs.SetInt(Preferences.PrefStartUp, 0); } else { if (Time.realtimeSinceStartup < 10) { show = (Preferences.ShowOption)EditorPrefs.GetInt(Preferences.PrefStartUp, 0); // check version here if (show == Preferences.ShowOption.OnNewVersion) { ASEStartScreen.StartBackgroundTask(StartRequest(ASEStartScreen.ChangelogURL, () => { var changeLog = ChangeLogInfo.CreateFromJSON(www.downloadHandler.text); if (changeLog != null) { if (changeLog.Version > VersionInfo.FullNumber) { ASEStartScreen.Init(); } } })); } } } if (show == Preferences.ShowOption.Always) { ASEStartScreen.Init(); } } }
static void Update() { EditorApplication.update -= Update; if (!EditorApplication.isPlayingOrWillChangePlaymode) { bool show = false; if (!EditorPrefs.HasKey("ASELastSession")) { show = true; EditorPrefs.SetBool("ASELastSession", true); } else { if (Time.realtimeSinceStartup < 10) { show = EditorPrefs.GetBool("ASELastSession", true); // check version here if (!show) { ASEStartScreen.StartBackgroundTask(StartRequest(ASEStartScreen.ChangelogURL, () => { var changeLog = ChangeLogInfo.CreateFromJSON(www.downloadHandler.text); if (changeLog != null) { if (changeLog.Version > VersionInfo.FullNumber) { ASEStartScreen.Init(); } } })); } } } if (show) { ASEStartScreen.Init(); } } }