コード例 #1
0
        public void Update(Install install)
        {
            var update = new Updater(this, this, GithubApi, Logger);

            update.Update(install);


            var reimports = Installs.Where(i => i.ConfigData.RequiresFullReimport && !i.InstallFinalized).ToArray();

            if (reimports.Any())
            {
                var msg = "Following packages require full reimport to function properly:\n";
                foreach (var reimport in reimports)
                {
                    msg += reimport.ToShortString() + "\n";
                }

                ThreadingUtils.DispatchOnMainThread(() =>
                {
                    if (EditorUtility.DisplayDialog("Koinonia", msg, "Ok", "No, I'll do it myself"))
                    {
                        EditorApplication.ExecuteMenuItem("Assets/Reimport All");
                    }
                    else
                    {
                        AssetDatabase.Refresh();
                    }
                });
            }
            else
            {
                ThreadingUtils.DispatchOnMainThread(AssetDatabase.Refresh);
            }
        }
コード例 #2
0
        public void UninstallNode(Install selectedPackage)
        {
            var installation = new Uninstallation(this, this, GithubApi, Logger);
            var result       = installation.Uninstall(selectedPackage);

            if (selectedPackage.ConfigData.RequiresFullReimport)
            {
                var msg = "Deinstalled package requires full reimport " + selectedPackage.ToShortString();

                ThreadingUtils.DispatchOnMainThread(() =>
                {
                    if (EditorUtility.DisplayDialog("Koinonia", msg, "Ok", "No, I'll do it myself"))
                    {
                        EditorApplication.ExecuteMenuItem("Assets/Reimport All");
                    }
                    else
                    {
                        AssetDatabase.Refresh();
                    }
                });
            }
            else
            {
                ThreadingUtils.DispatchOnMainThread(AssetDatabase.Refresh);
            }
        }
コード例 #3
0
ファイル: TSAssetDatabase.cs プロジェクト: Siniana/Universum
 public static void Refresh()
 {
     ThreadingUtils.WaitOnMainThread(AssetDatabase.Refresh);
 }
コード例 #4
0
ファイル: KoinoniaWindow.cs プロジェクト: Siniana/Universum
 static KoinoniaWindow()
 {
     ThreadingUtils.Initialize();
 }