Пример #1
0
        private void OnEnable()
        {
            _windowInstance = this;

            _installedVersion = MyBoxUtilities.GetMyBoxInstalledVersion();
            MyBoxUtilities.GetMyBoxLatestVersionAsync(version =>
            {
                _latestVersion = version;
                if (_windowInstance != null)
                {
                    _windowInstance.Repaint();
                }
            });
        }
Пример #2
0
 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);
         }
     });
 }
Пример #3
0
 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);
             }
         });
     }
 }