private void OnEnable() { _windowInstance = this; _installedVersion = MyBoxUtilities.GetMyBoxInstalledVersion(); MyBoxUtilities.GetMyBoxLatestVersionAsync(version => { _latestVersion = version; if (_windowInstance != null) { _windowInstance.Repaint(); } }); }
private static void CheckForUpdates() { MyEditorEvents.OnEditorStarts -= CheckForUpdates; MyBoxUtilities.GetMyBoxLatestVersionAsync(version => { _installedVersion = MyBoxUtilities.GetMyBoxInstalledVersion(); _latestVersion = version; if (!_installedVersion.VersionsMatch(_latestVersion)) { var versions = "Installed version: " + _installedVersion.AsSting + ". Latest version: " + _latestVersion.AsSting; var message = "It's time to update MyBox :)! Use \"Tools/MyBox/Update MyBox\". " + versions; WarningsPool.Log(message); } }); }
static MyBoxWindow() { if (AutoUpdateCheckIsEnabled) { MyBoxUtilities.GetMyBoxLatestVersionAsync(version => { _installedVersion = MyBoxUtilities.GetMyBoxInstalledVersion(); _latestVersion = version; if (!_installedVersion.VersionsMatch(_latestVersion)) { var versions = "Installed version: " + _installedVersion.AsSting + ". Latest version: " + _latestVersion.AsSting; Debug.Log("It's time to update MyBox :)! Use \"Tools/MyBox/Update MyBox\". " + versions); } }); } }