public static HasIgnoreKey ( string key ) : bool | ||
key | string | |
Результат | bool |
// check vive input utility version on github private static void CheckVersionAndSettings() { if (Application.isPlaying) { EditorApplication.update -= CheckVersionAndSettings; return; } InitializeSettins(); // fetch new version info from github release site if (!completeCheckVersionFlow && VIUSettings.autoCheckNewVIUVersion) { if (webReq == null) // web request not running { if (EditorPrefs.HasKey(nextVersionCheckTimeKey) && DateTime.UtcNow < UtcDateTimeFromStr(EditorPrefs.GetString(nextVersionCheckTimeKey))) { VersionCheckLog("Skipped"); completeCheckVersionFlow = true; return; } webReq = GetUnityWebRequestAndSend(lastestVersionUrl); } if (!webReq.isDone) { return; } // On Windows, PlaterSetting is stored at \HKEY_CURRENT_USER\Software\Unity Technologies\Unity Editor 5.x EditorPrefs.SetString(nextVersionCheckTimeKey, UtcDateTimeToStr(DateTime.UtcNow.AddMinutes(versionCheckIntervalMinutes))); if (UrlSuccess(webReq)) { latestRepoInfo = JsonUtility.FromJson <RepoInfo>(GetWebText(webReq)); VersionCheckLog("Fetched"); } // parse latestVersion and ignoreThisVersionKey if (!string.IsNullOrEmpty(latestRepoInfo.tag_name)) { try { latestVersion = new System.Version(Regex.Replace(latestRepoInfo.tag_name, "[^0-9\\.]", string.Empty)); ignoreThisVersionKey = string.Format(fmtIgnoreUpdateKey, latestVersion.ToString()); } catch { latestVersion = default(System.Version); ignoreThisVersionKey = string.Empty; } } webReq.Dispose(); webReq = null; completeCheckVersionFlow = true; } VIUSettingsEditor.PackageManagerHelper.PreparePackageList(); if (VIUSettingsEditor.PackageManagerHelper.isPreparingList) { return; } showNewVersion = !string.IsNullOrEmpty(ignoreThisVersionKey) && !VIUProjectSettings.HasIgnoreKey(ignoreThisVersionKey) && latestVersion > VIUVersion.current; UpdateIgnoredNotifiedSettingsCount(false); if (showNewVersion || notifiedSettingsCount > 0) { TryOpenRecommendedSettingWindow(); } EditorApplication.update -= CheckVersionAndSettings; }
public bool IsIgnored() { return(VIUProjectSettings.HasIgnoreKey(ignoreKey)); }
// check vive input utility version on github private static void CheckVersionAndSettings() { if (Application.isPlaying) { EditorApplication.update -= CheckVersionAndSettings; return; } InitializeSettins(); // fetch new version info from github release site if (!completeCheckVersionFlow) { if (www == null) // web request not running { if (EditorPrefs.HasKey(nextVersionCheckTimeKey) && DateTime.UtcNow < UtcDateTimeFromStr(EditorPrefs.GetString(nextVersionCheckTimeKey))) { completeCheckVersionFlow = true; return; } www = new WWW(lastestVersionUrl); } if (!www.isDone) { return; } if (UrlSuccess(www)) { // On Windows, PlaterSetting is stored at \HKEY_CURRENT_USER\Software\Unity Technologies\Unity Editor 5.x EditorPrefs.SetString(nextVersionCheckTimeKey, UtcDateTimeToStr(DateTime.UtcNow.AddMinutes(versionCheckIntervalMinutes))); latestRepoInfo = JsonUtility.FromJson <RepoInfo>(www.text); } // parse latestVersion and ignoreThisVersionKey if (!string.IsNullOrEmpty(latestRepoInfo.tag_name)) { try { latestVersion = new Version(Regex.Replace(latestRepoInfo.tag_name, "[^0-9\\.]", string.Empty)); ignoreThisVersionKey = string.Format(fmtIgnoreUpdateKey, latestVersion.ToString()); } catch { latestVersion = default(Version); ignoreThisVersionKey = string.Empty; } } www.Dispose(); www = null; completeCheckVersionFlow = true; } showNewVersion = !string.IsNullOrEmpty(ignoreThisVersionKey) && !VIUProjectSettings.HasIgnoreKey(ignoreThisVersionKey) && latestVersion > VIUVersion.current; if (showNewVersion || RecommendedSettingPromptCount() > 0) { TryOpenRecommendedSettingWindow(); } EditorApplication.update -= CheckVersionAndSettings; }